示例#1
0
        /// <summary>
        /// 删除指定假期记录(物理删除,待定)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string strID = "";

            if (dgDeductDetailList.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            if (dgDeductDetailList.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            foreach (object ovj in dgDeductDetailList.SelectedItems)
            {
                T_HR_ATTENDANCEDEDUCTDETAIL ent = ovj as T_HR_ATTENDANCEDEDUCTDETAIL;
                string Result = "";
                if (ent != null)
                {
                    strID = ent.DEDUCTDETAILID.ToString();
                    ComfirmWindow delComfirm = new ComfirmWindow();
                    delComfirm.OnSelectionBoxClosed += (obj, result) =>
                    {
                        clientAtt.RemoveAttendanceDeductDetailAsync(strID);
                    };
                    delComfirm.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                }
            }
        }
示例#2
0
        /// <summary>
        /// 弹出表单子窗口,以便编辑考勤异常扣款定义
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            string strDeductDetailID = string.Empty;

            if (dgDeductDetailList.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            if (dgDeductDetailList.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            T_HR_ATTENDANCEDEDUCTDETAIL ent = dgDeductDetailList.SelectedItems[0] as T_HR_ATTENDANCEDEDUCTDETAIL;

            strDeductDetailID = ent.DEDUCTDETAILID.ToString();
            AttendanceDeductDetailForm formDetail = new AttendanceDeductDetailForm(FormTypes.Edit, strDeductDetailID, entAttendanceDeductMaster);
            EntityBrowser entBrowser = new EntityBrowser(formDetail);

            entBrowser.MinWidth         = 700;
            entBrowser.MinHeight        = 300;
            entBrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(entBrowser_ReloadDataEvent);
            entBrowser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }
示例#3
0
        /// <summary>
        /// 根据主键索引,获得指定的考勤异常扣款明细记录以便查看编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientAtt_GetAttendanceDeductDetailByIDCompleted(object sender, GetAttendanceDeductDetailByIDCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                AttendanceDeductDetail = e.Result;
                this.DataContext       = AttendanceDeductDetail;
                AttendanceDeductMaster = AttendanceDeductDetail.T_HR_ATTENDANCEDEDUCTMASTER;

                if (AttendanceDeductMaster != null)
                {
                    InitMasterInfo();
                    InitDetailInfo();
                }

                SetToolBar();
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }
示例#4
0
        /// <summary>
        /// 表单初始化
        /// </summary>
        private void InitForm()
        {
            AttendanceDeductDetail = new T_HR_ATTENDANCEDEDUCTDETAIL();
            AttendanceDeductDetail.DEDUCTDETAILID = System.Guid.NewGuid().ToString().ToUpper();
            if (AttendanceDeductMaster == null)
            {
                return;
            }
            AttendanceDeductDetail.T_HR_ATTENDANCEDEDUCTMASTER = AttendanceDeductMaster;
            AttendanceDeductDetail.FINETYPE = AttendanceDeductMaster.FINETYPE;

            InitMasterInfo();
            InitDetailInfo();

            //2010年2月11日, 11:37:35,目前暂未实现登录部分,人员相关数据为假定值
            AttendanceDeductDetail.CREATEDATE   = DateTime.Now;
            AttendanceDeductDetail.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
            AttendanceDeductDetail.UPDATEDATE   = System.DateTime.Now;
            AttendanceDeductDetail.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;


            this.DataContext = AttendanceDeductDetail;
        }
示例#5
0
 public string ModifyAttendanceDeductDetail(T_HR_ATTENDANCEDEDUCTDETAIL entRd)
 {
     using (AttendanceDeductDetailBLL bllAttendanceDeductDetail = new AttendanceDeductDetailBLL())
     {
         return bllAttendanceDeductDetail.ModifyDeductDetail(entRd);
     }
 }
        /// <summary>
        /// 根据主键索引,获得指定的考勤异常扣款明细记录以便查看编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientAtt_GetAttendanceDeductDetailByIDCompleted(object sender, GetAttendanceDeductDetailByIDCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                AttendanceDeductDetail = e.Result;
                this.DataContext = AttendanceDeductDetail;
                AttendanceDeductMaster = AttendanceDeductDetail.T_HR_ATTENDANCEDEDUCTMASTER;

                if (AttendanceDeductMaster != null)
                {
                    InitMasterInfo();
                    InitDetailInfo();
                }

                SetToolBar();
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }
        /// <summary>
        /// 表单初始化
        /// </summary>
        private void InitForm()
        {
            AttendanceDeductDetail = new T_HR_ATTENDANCEDEDUCTDETAIL();
            AttendanceDeductDetail.DEDUCTDETAILID = System.Guid.NewGuid().ToString().ToUpper();
            if (AttendanceDeductMaster == null)
            {
                return;
            }
            AttendanceDeductDetail.T_HR_ATTENDANCEDEDUCTMASTER = AttendanceDeductMaster;
            AttendanceDeductDetail.FINETYPE = AttendanceDeductMaster.FINETYPE;

            InitMasterInfo();
            InitDetailInfo();

            //2010年2月11日, 11:37:35,目前暂未实现登录部分,人员相关数据为假定值
            AttendanceDeductDetail.CREATEDATE = DateTime.Now;
            AttendanceDeductDetail.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
            AttendanceDeductDetail.UPDATEDATE = System.DateTime.Now;
            AttendanceDeductDetail.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;


            this.DataContext = AttendanceDeductDetail;
        }