private void GetDetailsById(int Id) { shift = new Shifts(); dbShift = new DBShift(); DataSet DS = new DataSet(); shift.ShiftId = Id; shift.ShiftName = string.Empty; shift.StartTime = string.Empty; shift.Description = string.Empty; shift.EndTime = string.Empty; shift.Flag = 2; DS = dbShift.GetShiftList(shift); if (!Comman.Comman.IsDataSetEmpty(DS)) { txtShiftName.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["ShiftName"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["ShiftName"].ToString(); txtDesciption.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["Description"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["Description"].ToString(); txtStartTime.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["StartTime"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["StartTime"].ToString(); txtEndTime.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["EndTime"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["EndTime"].ToString(); dpIsActive.ClearSelection(); if (DS.Tables[0].Rows[0]["IsActive"].ToString() == "True") { dpIsActive.Items.FindByValue("1").Selected = true; } else { dpIsActive.Items.FindByValue("2").Selected = true; } } btnSubmit.Visible = false; btnUpdate.Visible = true; upModal.Update(); }
private void GetList() { shift = new Shifts(); dbShift = new DBShift(); DataSet DS = new DataSet(); shift.Flag = 0; //Select * shift.ShiftName = string.Empty; shift.StartTime = string.Empty; shift.Description = string.Empty; shift.EndTime = string.Empty; DS = dbShift.GetShiftList(shift); if (!Comman.Comman.IsDataSetEmpty(DS)) { rpShiftList.DataSource = DS; rpShiftList.DataBind(); } }