Esempio n. 1
0
 protected void GVStaus_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "View")
         {
             Registration_BE objR = new Registration_BE();
             dt = new DataTable();
             GridViewRow gvrow = (GridViewRow)((Control)e.CommandSource).NamingContainer;
             // objR.DI_AO_Code = dicode;
             objR.dept   = Department;
             objR.status = ((Label)(gvrow.FindControl("lblStatusId"))).Text;
             string Status = ((Label)(gvrow.FindControl("lblStatusName"))).Text;
             objR.Action = "SMPL";
             dt          = Objrdl.DashBoard(objR, con);
             if (dt.Rows.Count > 0)
             {
                 GVSamples.DataSource = dt;
                 GVSamples.DataBind();
                 SampleData.Visible = true;
                 lblStatus.Text     = Status;
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
         Response.Redirect("~/Error.aspx");
     }
 }
Esempio n. 2
0
 public DataTable FreezeSamples(Registration_BE obj, string ConnKey)
 {
     using (SqlConnection con = new SqlConnection(ConnKey))
     {
         using (SqlDataAdapter da = new SqlDataAdapter("FreezeSamples", con))
         {
             da.SelectCommand.CommandType = CommandType.StoredProcedure;
             da.SelectCommand.Parameters.Add("@tvp", SqlDbType.Structured).Value = obj.TVP;
             DataTable dt = new DataTable();
             da.Fill(dt);
             return(dt);
         }
     }
 }
Esempio n. 3
0
 protected void BindGrid()
 {
     try
     {
         Registration_BE objR = new Registration_BE();
         objR.dept = Department;
         //objR.DI_AO_Code = dicode;
         dt                 = new DataTable();
         objR.Action        = "DISTATUS";
         dt                 = Objrdl.DashBoard(objR, con);
         GVStaus.DataSource = dt;
         GVStaus.DataBind();
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
         Response.Redirect("~/Error.aspx");
     }
 }