public DataSet BAL_SYS_Rescheduling_Details_Student(SYS_Rescheduling Prop_SYS_Rescheduling, String mode) { DataSet ds = new DataSet(); DAL_SYS_Status = new DataAccess(); arrParameter = new ArrayList(); return(DAL_SYS_Status.DAL_Select("Proc_Select_Rescheduling_Student", arrParameter)); }
public DataSet BAL_SYS_Rescheduling_Update_Student(SYS_Rescheduling Prop_SYS_Rescheduling) { DataSet ds = new DataSet(); DAL_SYS_Status = new DataAccess(); arrParameter = new ArrayList(); arrParameter.Add(new parameter("SReSchedulingID", Prop_SYS_Rescheduling.SReSchedulingID)); arrParameter.Add(new parameter("BMSSCTID", Prop_SYS_Rescheduling.BMSSCTID)); arrParameter.Add(new parameter("StudentID", Prop_SYS_Rescheduling.StudentID)); arrParameter.Add(new parameter("StartDate", Prop_SYS_Rescheduling.StartDate)); arrParameter.Add(new parameter("EndDate", Prop_SYS_Rescheduling.EndDate)); return(DAL_SYS_Status.DAL_Select("Proc_Update_Rescheduling_Student", arrParameter)); }
protected void grdRescheduling_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Approve") { LinkButton lb = (LinkButton)e.CommandSource; GridViewRow gvr = (GridViewRow)lb.NamingContainer; Int64 BMSSCTID = Convert.ToInt64(grdRescheduling.DataKeys[gvr.RowIndex].Values["BMSSCTID"].ToString()); Int64 ReSchedulingID = Convert.ToInt64(grdRescheduling.DataKeys[gvr.RowIndex].Values["ReSchedulingID"].ToString()); Int64 EmployeeID = Convert.ToInt64(grdRescheduling.DataKeys[gvr.RowIndex].Values["EmployeeID"].ToString()); TextBox txt1 = (TextBox)grdRescheduling.Rows[gvr.RowIndex].Cells[8].FindControl("txtStartDate"); DateTime StartDate = DateTime.ParseExact(txt1.Text, "dd-MM-yyyy", null); TextBox txt2 = (TextBox)grdRescheduling.Rows[gvr.RowIndex].Cells[9].FindControl("txtEndDate"); DateTime EndDate = DateTime.ParseExact(txt2.Text, "dd-MM-yyyy", null); string Subject = grdRescheduling.DataKeys[gvr.RowIndex].Values["Subject"].ToString(); string Standard = grdRescheduling.DataKeys[gvr.RowIndex].Values["Standard"].ToString(); string Division = grdRescheduling.DataKeys[gvr.RowIndex].Values["Division"].ToString(); string Chapter = grdRescheduling.DataKeys[gvr.RowIndex].Values["Chapter"].ToString(); string Topic = grdRescheduling.DataKeys[gvr.RowIndex].Values["Topic"].ToString(); ArrayList alistEmailAddress = GenerateEmailAddress(EmployeeID); if (alistEmailAddress.Count > 0) { string Body = GenerateEmailBody(Subject, Standard, Division, Chapter, Topic, EndDate.ToString("dd-MMM-yyyy")); EmailUtility.SendEmail(alistEmailAddress, "Rescheduling request Approval", Body); } if (IsValidDates(StartDate, EndDate)) { BLogic_SYS_Rescheduling = new SYS_Rescheduling_BLogic(); Prop_SYS_Rescheduling = new SYS_Rescheduling(); Prop_SYS_Rescheduling.ReSchedulingID = ReSchedulingID; Prop_SYS_Rescheduling.BMSSCTID = BMSSCTID; Prop_SYS_Rescheduling.EmployeeID = EmployeeID; Prop_SYS_Rescheduling.StartDate = StartDate; Prop_SYS_Rescheduling.EndDate = EndDate; BLogic_SYS_Rescheduling.BAL_SYS_Rescheduling_Update(Prop_SYS_Rescheduling); ViewState["ID"] = null; BindGridAttandance(); } else { WebMsg.Show("2 Days Difference is must"); } } }