Posts

Showing posts from 2013

Add Dynamic row to a table

Image
    private void AddNewRow()     {         try         {             DataTable dt = (DataTable)ViewState["CurrentTable32"];             DataRow dr = null;                 dr = dt.NewRow();                 dr["Col1"] = string.Empty;                 dr["PerilCode"] = txtPerilCode.Text;                 dr["PerilName"] = txtPerilName.Text;                 dr["Rate"] = txtRate.Text;                 dr["Value"] = txtValuePeril.Text;                 dr["Col6"] = string.Empty;                 dr["ValueAct"] = "T";         ...

How to select multiple templates details from gridview

    protected void grvrisk_RowCommand(object sender, GridViewCommandEventArgs e)     {         if (e.CommandName.Equals("Delete"))         {             GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);             string riskId = ((TextBox)row.FindControl("txtRiskClassID")).Text.ToString();             string occupationId = ((TextBox)row.FindControl("txtRiskClassID")).Text.ToString();             string occupationDetails = ((TextBox)row.FindControl("txtRiskClassID")).Text.ToString();             string classNo = ((TextBox)row.FindControl("txtRiskClassID")).Text.ToString();             string sumInsured = ((TextBox)row.FindControl("txtRiskClassID")).Text.ToString();         }     ...

Delete Row using Viewstate(Session)

        DataTable dt = (DataTable)ViewState["CurrentTable2"];         if (dt.Rows.Count > 1)         {             dt.Rows.RemoveAt(e.RowIndex);             dt.AcceptChanges();             grvrisk.DataSource = dt;             grvrisk.DataBind();         }         else         {             Response.Write("Add value");         }

Gridview to Datatable and Viewstate

///Gridview to ViewState                     try                     {                         DataTable dt = new DataTable();                         dt.Columns.Add("RiskId");                         dt.Columns.Add("OccupationID");                         dt.Columns.Add("occupationDetails");                         dt.Columns.Add("classno");                         dt.Columns.Add("sumInsuredItem");                         DataRow dr;         ...

How to save image as a blobs(Binary format) in database

All you have to do is refer comment lines and use the code same way ............. using (Bitmap bitmap = new Bitmap(934, 441))             {                 using (Graphics g = Graphics.FromImage(bitmap))                 {                     // Get the paramters to call g.CopyFromScreen and get the image                     Rectangle rectanglePanelVideoPreview = Soilgrapcircle1.Bounds;                     Point sourcePoints = Soilgrapcircle1.PointToScreen(new Point(Soilgrapcircle1.ClientRectangle.X, Soi...

You think Creating Circuler Graph is a difficult task ...........!!!

Image
Not difficult as much as I thogh, to create circular graphs  /* //User can use this method to rtive data from DB    string q9 = "select DISTINCT testcode from soilfinalcal order by testcode";             DataSet st1 = MVCAController.db_access.SelectData(q9);             if (st1 != null)             {                 cmbCircleGraph.DataSource = st1.Tables[0];                 cmbCircleGraph.ValueMember = "testcode";                 cmbCircleGraph.DisplayMember = "testcode";                 cmbCircleGraph.Te...

How to use Windows Encorder

First you have to download encoder software http://www.microsoft.com/en-us/download/details.aspx?id=17792 (it's run time free we are using only run time library  ) the install it Add  references to the project(Encoder all library has update into your VS dll table) Using web camera or IP camera capture the rock image and save it in DB and Filtering data that are taken from the excel sheets.I used Windows encoder and those library and  Muthu created API to do those algorithm. Not only that but I did viewing part of that filtering data using graphs and user can came to conclusion using those graphs. Important : I learn those things using CodeProject web site(http://www.codeproject.com/kb/cs/) Camera code segment-----------         private void btnAppCap_Click(object sender, EventArgs e)         {                       vi...

My First Standalone Application(JAVA)

Image
Introduction This system helps to manage vehicle reservation in Amazing Destination (pvt) Ltd. I developed to level to manage.                                  Both users can log using password which user is log in depend on username and password. After log in Transport officers can insert, Update and Delete information about vehicles, Travel Guides and he also can manage information about Transport Officers also. Can see Information about all vehicles and Reservations made for a certain vehicle during a given time period . And transport Officer can see Information about all vehicles and Reservations made for a certain vehicle during a given time period.                             After log...