private void FillShiftList()
        {
            ShiftBAL          _objBAL   = new ShiftBAL();
            List <ShiftModel> ShiftList = new List <ShiftModel>();

            ShiftList              = _objBAL.GetShiftList();
            cmbShift.DataSource    = ShiftList;
            cmbShift.DisplayMember = "_ShiftName";
            cmbShift.ValueMember   = "_ShiftID";
            cmbShift.SelectedIndex = -1;
            cmbShift.Text          = "Select Shift";
        }
Example #2
0
        private void FillGrid()
        {
            ShiftBAL          _objBAL   = new ShiftBAL();
            List <ShiftModel> ShiftList = new List <ShiftModel>();

            grdShifts.DataSource = null;
            grdShifts.Rows.Clear();
            ShiftList = _objBAL.GetShiftList();
            grdShifts.AutoGenerateColumns = false;
            int count = 0;

            foreach (var item in ShiftList)
            {
                count++;
                grdShifts.Rows.Add(item._ShiftID, item._ShiftName, item._StartTime.TimeOfDay, item._EndTime.TimeOfDay, item._ModifiedDate);
            }

            tbxCount.Text = count.ToString();
        }