protected void lkbEditShift_Click(object sender, EventArgs e) { MasterEntries objMasterEntry = new MasterEntries(); LinkButton b = (LinkButton)sender; int Id = Convert.ToInt32(b.CommandArgument); MasterShifts objShift = new MasterShifts(); objMasterEntry.GetShiftsById(Id, out objShift); Session["shiftId"] = Id; txtEditName.Text = objShift.Name.ToString(); txtEditFirstHalfStart.Text = objShift.FirstHalfStart.ToString(); txtEditFirstHalfEnd.Text = objShift.FirstHalfEnd.ToString(); txtEditSecondHalfStart.Text = objShift.SecondHalfStart.ToString(); txtEditSecondHalfEnd.Text = objShift.SecondHalfEnd.ToString(); txtEditSLDuration.Text = objShift.SHLDuration.ToString(); popupEditShifts.Show(); }