Beispiel #1
0
        private void repositoryItemLookUpEdit2_QueryPopUp(object sender, CancelEventArgs e)
        {
            LookUpEdit lookUpEdit = (LookUpEdit)sender;
            ADWorkingShiftGroupsController  controller = new ADWorkingShiftGroupsController();
            List <ADWorkingShiftGroupsInfo> list       = (List <ADWorkingShiftGroupsInfo>)controller.GetListFromDataSet(controller.GetAllObjects());

            if (list != null && list.Count > 0)
            {
                list.Insert(0, new ADWorkingShiftGroupsInfo());
                lookUpEdit.Properties.DataSource = list;
            }
        }
Beispiel #2
0
 private void gridView_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e)
 {
     if (e.Column.FieldName == "FK_ADWorkingShiftGroupID")
     {
         if (e.Value != null)
         {
             int id = int.Parse(e.Value.ToString());
             ADWorkingShiftGroupsController controller = new ADWorkingShiftGroupsController();
             ADWorkingShiftGroupsInfo       objWorkingShiftGroupsInfo = (ADWorkingShiftGroupsInfo)controller.GetObjectByID(id);
             if (objWorkingShiftGroupsInfo != null)
             {
                 e.DisplayText = objWorkingShiftGroupsInfo.ADWorkingShiftGroupName;
             }
         }
     }
 }
Beispiel #3
0
        public void InvalidateData()
        {
            ADConfigValuesController objConfigValuesController = new ADConfigValuesController();
            DataSet ds = objConfigValuesController.GetADConfigValuesByGroup(ConfigValueGroup.RewardType.ToString());

            RewardTypesList.Invalidate(ds);

            ds = objConfigValuesController.GetADConfigValuesByGroup(ConfigValueGroup.DisciplineType.ToString());
            DisciplineTypesList.Invalidate(ds);

            ADWorkingShiftGroupsController  objWorkingShiftGroupsController = new ADWorkingShiftGroupsController();
            List <ADWorkingShiftGroupsInfo> wsgList = objWorkingShiftGroupsController.GetAllWorkingShiftGroup();

            WorkingShiftGroupsList.Invalidate(wsgList);

            HRFormAllowancesController  objFormAllowancesController = new HRFormAllowancesController();
            List <HRFormAllowancesInfo> faList = objFormAllowancesController.GetAllFormAllowances();

            FormAllowancesList.Invalidate(faList);

            ADOTFactorsController  objOTFactorsController = new ADOTFactorsController();
            List <ADOTFactorsInfo> otfList = objOTFactorsController.GetAllOTFactors();

            OTFactorsList.Invalidate(otfList);

            HRTimesheetEmployeeLateConfigsController  objTimesheetEmployeeLateConfigsController = new HRTimesheetEmployeeLateConfigsController();
            List <HRTimesheetEmployeeLateConfigsInfo> telcList = objTimesheetEmployeeLateConfigsController.GetAllTimesheetEmployeeLateConfigs();

            TimesheetEmployeeLateConfigsList.Invalidate(telcList);

            ADTimesheetConfigsController objTimesheetConfigsController = new ADTimesheetConfigsController();

            ds = objTimesheetConfigsController.GetAllObjects();
            TimesheetConfigsList.Invalidate(ds);

            ADWorkingShiftsController objWorkingShiftsController = new ADWorkingShiftsController();

            ds = objWorkingShiftsController.GetAllObjects();
            WorkingShiftsList.Invalidate(ds);

            HRTimeSheetParamsController objTimeSheetParamsController = new HRTimeSheetParamsController();

            ds = objTimeSheetParamsController.GetAllObjects();
            List <HRTimeSheetParamsInfo> list = new List <HRTimeSheetParamsInfo>();

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                HRTimeSheetParamsInfo objTimeSheetParamsInfo = new HRTimeSheetParamsInfo();
                objTimeSheetParamsInfo = (HRTimeSheetParamsInfo)objTimeSheetParamsController.GetObjectFromDataRow(row);
                objTimeSheetParamsInfo.HRTimeSheetParamValue2 = objTimeSheetParamsInfo.HRTimeSheetParamValue2 * 100;
                if (!objTimeSheetParamsInfo.IsOTCalculated)
                {
                    list.Add(objTimeSheetParamsInfo);
                }
            }
            TimeSheetParamsList.Invalidate(list);

            List <HRTimeSheetParamsInfo> list2 = new List <HRTimeSheetParamsInfo>();
            List <HRTimeSheetParamsInfo> lst   = objTimeSheetParamsController.GetOTTimeSheetParamsList();

            foreach (HRTimeSheetParamsInfo info in lst)
            {
                info.HRTimeSheetParamValue2 = info.HRTimeSheetParamValue2 * 100;
                list2.Add(info);
            }
            TimeSheetParam2sList.Invalidate(list2);
        }