protected void grid_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "print_barcode") { int idx = Convert.ToInt32(e.CommandArgument); GridViewRow Row = grid.Rows[idx]; string job_id; job_id = Row.Cells[1].Text; DataTable dt; BLL.job _BLL = new BLL.job(); dt = _BLL.getData_ReportJob(job_id); Session["DATATABLE"] = dt; //Model.Log L = new Model.Log(); //Helper.Utility Log = new Helper.Utility(); //L.content = "Go to SendMailApprove.aspx."; //L.create_by = Session["EMAIL"].ToString(); //Log.WriteLog(L); Response.Redirect("~/Report/rpt_Job.aspx"); } if (e.CommandName == "REPORT") { int idx = Convert.ToInt32(e.CommandArgument); GridViewRow Row = grid.Rows[idx]; string job_id; job_id = Row.Cells[1].Text; DataTable dt; BLL.job _BLL = new BLL.job(); dt = _BLL.getData_ReportJobTimestamp(job_id); Session["DATATABLE"] = dt; //Model.Log L = new Model.Log(); //Helper.Utility Log = new Helper.Utility(); //L.content = "Go to SendMailApprove.aspx."; //L.create_by = Session["EMAIL"].ToString(); //Log.WriteLog(L); Response.Redirect("~/Report/rpt_job_report.aspx"); } if (e.CommandName == "DELETE") { int idx = Convert.ToInt32(e.CommandArgument); GridViewRow Row = grid.Rows[idx]; string job_id; job_id = Row.Cells[1].Text; BLL.job _BLL = new BLL.job(); _BLL.Delete_Job(job_id); } }
protected void grid_RowDeleting(object sender, GridViewDeleteEventArgs e) { int idx = Convert.ToInt32(e.RowIndex); GridViewRow Row = grid.Rows[idx]; string job_id; job_id = Row.Cells[1].Text; BLL.job _BLL = new BLL.job(); _BLL.Delete_Job(job_id); BindGrid(); }