protected void BindGrid() { objR.Action = "R"; objR.DI_AO_Code = DI_AO_Code; dt = objdi.SampleRegistrationDI(objR, con); if (dt.Rows.Count > 0) { Gvfreeze.DataSource = dt; Gvfreeze.DataBind(); } }
protected void BindGrid() { objR.Action = "R"; objR.DI_AO_Code = Aocode; objR.dept = Department; objR.SampleCategory = Session["SampleCategory"].ToString(); dt = Regobjdl.FertlizerRegistration(objR, con); if (dt.Rows.Count > 0) { Gvfreeze.DataSource = dt; Gvfreeze.DataBind(); } }
protected void btnfreeze_Click(object sender, EventArgs e) { try { DataTable dtfreeze = new DataTable(); dtfreeze.Columns.Add("sampleID", typeof(string)); int j = 0; foreach (GridViewRow gr in Gvfreeze.Rows) { if (((CheckBox)gr.FindControl("chkSelct")).Checked == true) { dtfreeze.Rows.Add(); dtfreeze.Rows[j]["sampleID"] = ((Label)gr.FindControl("lblsmid")).Text; j++; } } if (j == 0) { cf.ShowAlertMessage("Select atleast one row to freeze"); } else { objR.Action = "AO"; objR.TVP = dtfreeze; dt = Regobjdl.FreezeSamples(objR, con); if (dt.Rows.Count > 0) { cf.ShowAlertMessage("Not freezed, try again"); } else { cf.ShowAlertMessage(" data freezed"); Gvfreeze.DataSource = null; Gvfreeze.DataBind(); } pnlfreeze.Visible = false; RblCategory.ClearSelection(); BindGrid(); } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString()); cf.ShowAlertMessage(ex.ToString()); } }
protected void BindGrid() { objR.Action = "R_AO"; objR.DI_AO_Code = Aocode; objR.SampleCategory = Session["SampleCategory"].ToString(); //dt = Regobjdl.PesticideRegistration(objR, con); if (dt.Rows.Count > 0) { Gvfreeze.DataSource = dt; Gvfreeze.DataBind(); } else { Gvfreeze.DataSource = null; Gvfreeze.DataBind(); cf.ShowAlertMessage("No Data"); } }
protected void btnfreeze_Click(object sender, EventArgs e) { try { DataTable dtfreeze = new DataTable(); dtfreeze.Columns.Add("sampleID", typeof(string)); int j = 0; foreach (GridViewRow gr in Gvfreeze.Rows) { if (((CheckBox)gr.FindControl("chkSelct")).Checked == true) { dtfreeze.Rows.Add(); dtfreeze.Rows[j]["sampleID"] = ((Label)gr.FindControl("lblsmid")).Text; j++; } } if (j == 0) { cf.ShowAlertMessage("Select atleast one row to freeze"); } else { objR.TVP = dtfreeze; objR.Action = "DI"; dt = objdi.FreezeSamples(objR, con); if (dt.Rows.Count > 0) { cf.ShowAlertMessage("Not freezed, try again"); } else { cf.ShowAlertMessage("Sample Registered Successfully"); Gvfreeze.DataSource = null; Gvfreeze.DataBind(); BindGrid(); } } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString()); Response.Redirect("../Error.aspx"); } }
protected void BindGrid() { objR.Action = "R"; objR.DI_AO_Code = Aocode; objR.dept = Department; objR.SampleCategory = RblCategory.SelectedValue; dt = Regobjdl.FertlizerRegistration(objR, con); if (dt.Rows.Count > 0) { Gvfreeze.DataSource = dt; Gvfreeze.DataBind(); lblfreezename.Text = RblCategory.SelectedItem.Text; } else { Gvfreeze.DataSource = null; Gvfreeze.DataBind(); cf.ShowAlertMessage("No Data"); pnlfreeze.Visible = false; btnfreeze.Visible = false; } }