Beispiel #1
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        internal bool Save(ref T_HR_ATTENDANCESOLUTION entAttSol, out ObservableCollection <T_HR_ATTENDANCESOLUTIONDEDUCT> entListTemp)
        {
            bool flag = false;

            entListTemp = new ObservableCollection <T_HR_ATTENDANCESOLUTIONDEDUCT>();

            if (dgAttendanceDeductlist.ItemsSource == null)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REQUIRED", "ATTENDANCEUNUSUALDEDUCT"));
                return(false);
            }

            entAttendanceDeductMasters = dgAttendanceDeductlist.ItemsSource as ObservableCollection <T_HR_ATTENDANCEDEDUCTMASTER>;
            entListTemp.Clear();

            CheckSubmitForm(ref entAttSol);

            for (int i = 0; i < entAttendanceDeductMasters.Count; i++)
            {
                T_HR_ATTENDANCESOLUTIONDEDUCT entTemp = new T_HR_ATTENDANCESOLUTIONDEDUCT();
                entTemp.SOLUTIONDEDUCTID            = System.Guid.NewGuid().ToString();
                entTemp.T_HR_ATTENDANCEDEDUCTMASTER = entAttendanceDeductMasters[i] as T_HR_ATTENDANCEDEDUCTMASTER;
                entTemp.T_HR_ATTENDANCESOLUTION     = entAttSol;

                entTemp.CREATEDATE   = DateTime.Now;
                entTemp.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                entTemp.UPDATEDATE   = System.DateTime.Now;
                entTemp.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                entListTemp.Add(entTemp);
            }

            if (entListTemp.Count > 0)
            {
                flag = true;
            }

            return(flag);
        }
Beispiel #2
0
 public string ModifyAttendanceSolutionDeduct(T_HR_ATTENDANCESOLUTIONDEDUCT entTemp)
 {
     using (AttendanceSolutionDeductBLL bllAttendanceSolutionDeduct = new AttendanceSolutionDeductBLL())
     {
         return bllAttendanceSolutionDeduct.ModifyAttSolDeduct(entTemp);
     }
 }
Beispiel #3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        internal bool Save(ref T_HR_ATTENDANCESOLUTION entAttSol, out ObservableCollection<T_HR_ATTENDANCESOLUTIONDEDUCT> entListTemp)
        {
            bool flag = false;

            entListTemp = new ObservableCollection<T_HR_ATTENDANCESOLUTIONDEDUCT>();

            if (dgAttendanceDeductlist.ItemsSource == null)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REQUIRED", "ATTENDANCEUNUSUALDEDUCT"));
                return false;
            }

            entAttendanceDeductMasters = dgAttendanceDeductlist.ItemsSource as ObservableCollection<T_HR_ATTENDANCEDEDUCTMASTER>;
            entListTemp.Clear();

            CheckSubmitForm(ref entAttSol);

            for (int i = 0; i < entAttendanceDeductMasters.Count; i++)
            {
                T_HR_ATTENDANCESOLUTIONDEDUCT entTemp = new T_HR_ATTENDANCESOLUTIONDEDUCT();
                entTemp.SOLUTIONDEDUCTID = System.Guid.NewGuid().ToString();
                entTemp.T_HR_ATTENDANCEDEDUCTMASTER = entAttendanceDeductMasters[i] as T_HR_ATTENDANCEDEDUCTMASTER;
                entTemp.T_HR_ATTENDANCESOLUTION = entAttSol;

                entTemp.CREATEDATE = DateTime.Now;
                entTemp.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                entTemp.UPDATEDATE = System.DateTime.Now;
                entTemp.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                entListTemp.Add(entTemp);
            }

            if (entListTemp.Count > 0)
            {
                flag = true;
            }

            return flag;
        }