Ejemplo n.º 1
0
        /// <summary>
        /// 弹出表单子窗口,以便编辑指定加班申请记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnEdit_Click(object sender, RoutedEventArgs e)
        {

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

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

            T_HR_OUTAPPLYRECORD tmpEnt = dgOTList.SelectedItems[0] as T_HR_OUTAPPLYRECORD;

            //修改 如果是已审核的单据 提示不容许修改
            if (tmpEnt.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("DELETEAUDITERROR"));
                MessageBox.Show("已审核的单据不容许修改.");
                return;
            }

            OutAppliecationForm form = new OutAppliecationForm(FormTypes.Edit, tmpEnt.OUTAPPLYID);

            EntityBrowser entBrowser = new EntityBrowser(form);
            entBrowser.FormType = FormTypes.Edit;
            entBrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            entBrowser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });

        }
Ejemplo n.º 2
0
        /// <summary>
        /// 审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnAudit_Click(object sender, RoutedEventArgs e)
        {
            if (dgOTList.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "APPOVALBUTTON"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

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

            T_HR_OUTAPPLYRECORD tmpEnt = dgOTList.SelectedItems[0] as T_HR_OUTAPPLYRECORD;
            OutAppliecationForm form = new OutAppliecationForm(FormTypes.Audit, tmpEnt.OUTAPPLYID);
            EntityBrowser browser = new EntityBrowser(form);
            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.FormType = FormTypes.Audit;
            browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });

        }
Ejemplo n.º 3
0
        /// <summary>
        /// 弹出表单子窗口,以便新增加班申请
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        void btnNew_Click(object sender, RoutedEventArgs e)
        {
            string strOverTimeRecordID = string.Empty;
            OutAppliecationForm formOverTime = new OutAppliecationForm(FormTypes.New, strOverTimeRecordID);
            EntityBrowser entBrowser = new EntityBrowser(formOverTime);
            entBrowser.FormType = FormTypes.New;

            entBrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            entBrowser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
            //Utility.CreateFormFromEngine("F66FB573-5194-4732-BF51-B7745079C050", "SMT.HRM.UI.Form.Attendance.AttendMonthlyBalanceAudit", "Audit");
        }