Exemple #1
0
        void btnReSubmit_Click(object sender, RoutedEventArgs e)
        {
            string strAttendanceSolutionID = string.Empty;

            if (dgEmpLeaveRdList.SelectedItems == null)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"));
                return;
            }

            if (dgEmpLeaveRdList.SelectedItems.Count == 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"));
                return;
            }


            T_HR_EMPLOYEECANCELLEAVE tmpEnt = dgEmpLeaveRdList.SelectedItems[0] as T_HR_EMPLOYEECANCELLEAVE;

            TerminateLeaveForm form       = new TerminateLeaveForm(FormTypes.Resubmit, tmpEnt.CANCELLEAVEID);
            EntityBrowser      entBrowser = new EntityBrowser(form);

            //Modified by: Sam
            //Date       : 2011-9-6
            //For        : 此处导致打开Form窗体会出现滚动条
            //form.MinWidth = 820;
            //form.MinHeight = 600;
            entBrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            entBrowser.FormType         = FormTypes.Resubmit;
            entBrowser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });            //BindGrid();
        }
Exemple #2
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEECANCELLEAVE Info)
        {
            //审核状态
            decimal?stateValue = Convert.ToDecimal("1");
            string  checkState = string.Empty;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY checkStateDict = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "CHECKSTATE" && s.DICTIONARYVALUE == stateValue).FirstOrDefault();
            checkState = checkStateDict == null ? "" : checkStateDict.DICTIONARYNAME;

            //岗位级别
            decimal?postlevelValue = Convert.ToDecimal(tbEmpLevel.Text.Trim());
            string  postLevelName  = string.Empty;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY postLevelDict = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "POSTLEVEL" && s.DICTIONARYVALUE == postlevelValue).FirstOrDefault();
            postLevelName = postLevelDict == null ? "" : postLevelDict.DICTIONARYNAME;

            SMT.SaaS.MobileXml.MobileXml             mx       = new SMT.SaaS.MobileXml.MobileXml();
            List <SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List <SMT.SaaS.MobileXml.AutoDictionary>();

            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTNAME", tbOrgName.Text.Trim(), tbOrgName.Text.Trim()));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "POSTLEVEL", tbEmpLevel.Text.Trim(), postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "ENTITYKEY", Info.CANCELLEAVEID, string.Empty));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return(a);
        }
Exemple #3
0
        void BtnView_Click(object sender, RoutedEventArgs e)
        {
            string strEvectionID = string.Empty;

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

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

            T_HR_EMPLOYEECANCELLEAVE entEvectionRd = dgEmpLeaveRdList.SelectedItems[0] as T_HR_EMPLOYEECANCELLEAVE;

            strEvectionID = entEvectionRd.CANCELLEAVEID;
            TerminateLeaveForm form    = new TerminateLeaveForm(FormTypes.Browse, strEvectionID);
            EntityBrowser      browser = new EntityBrowser(form);

            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.FormType         = FormTypes.Browse;
            browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
        }
Exemple #4
0
        /// <summary>
        /// 弹出表单子窗口,以便编辑请假记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            string strAttendanceSolutionID = string.Empty;

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

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


            T_HR_EMPLOYEECANCELLEAVE tmpEnt = dgEmpLeaveRdList.SelectedItems[0] as T_HR_EMPLOYEECANCELLEAVE;

            TerminateLeaveForm form       = new TerminateLeaveForm(FormTypes.Edit, tmpEnt.CANCELLEAVEID);
            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) => { });
        }
Exemple #5
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitParas()
        {
            if (FormType == FormTypes.New)
            {
                cancelLeave = new T_HR_EMPLOYEECANCELLEAVE();
                cancelLeave.CANCELLEAVEID = Guid.NewGuid().ToString();
                cancelLeave.CHECKSTATE    = Convert.ToInt32(SMT.SaaS.FrameworkUI.CheckStates.UnSubmit).ToString();

                //出差记录只能本人申请
                cancelLeave.EMPLOYEEID   = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                cancelLeave.EMPLOYEENAME = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
                cancelLeave.EMPLOYEECODE = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeCode;


                //权限控制
                cancelLeave.OWNERCOMPANYID    = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                cancelLeave.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                cancelLeave.OWNERPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                cancelLeave.OWNERID           = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;


                //2010年2月11日, 添加人信息
                cancelLeave.CREATEDATE   = DateTime.Now;
                cancelLeave.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                cancelLeave.UPDATEDATE   = System.DateTime.Now;
                cancelLeave.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                //添加人所属部门ID
                cancelLeave.CREATEPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                cancelLeave.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                cancelLeave.CREATECOMPANYID    = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;

                //赋初始值
                tbOrgName.Text = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName + " - " + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName + " - " + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName;
                tbEmpName.Text = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;

                tbEmpLevel.Text = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostLevel.ToString();
                if (!string.IsNullOrWhiteSpace(tbOrgName.Text))
                {
                    tbEmpName.Text = tbEmpName.Text + " - " + tbOrgName.Text;
                }

                this.DataContext = cancelLeave;

                SetToolBar();
            }
            else
            {
                client.GetEmployeeCancelLeaveByIDAsync(CancelLeaveID);
                if (FormType == FormTypes.Browse)
                {
                    this.IsEnabled = false;
                }
            }
        }
Exemple #6
0
        /// <summary>
        /// 删除指定的签卡记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            if (dgEmpLeaveRdList.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

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

            ObservableCollection <string> ids = new ObservableCollection <string>();

            foreach (object ovj in dgEmpLeaveRdList.SelectedItems)
            {
                T_HR_EMPLOYEECANCELLEAVE ent = ovj as T_HR_EMPLOYEECANCELLEAVE;
                if (ent == null)
                {
                    continue;
                }

                if (ent.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("DELETEAUDITERROR"));
                    break;
                }

                ids.Add(ent.CANCELLEAVEID);
            }

            string Result = "";

            if (ids.Count > 0)
            {
                ComfirmWindow delComfirm = new ComfirmWindow();
                delComfirm.OnSelectionBoxClosed += (obj, result) =>
                {
                    client.EmployeeCancelLeaveDeleteAsync(ids);
                };
                delComfirm.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
        }
Exemple #7
0
 public string EmployeeCancelLeaveUpdate(T_HR_EMPLOYEECANCELLEAVE obj)
 {
     using (EmployeeCancelLeaveBLL bll = new EmployeeCancelLeaveBLL())
     {
         return bll.EmployeeCancelLeaveUpdate(obj);
     }
 }
Exemple #8
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitParas()
        {
            if (FormType == FormTypes.New)
            {
                cancelLeave = new T_HR_EMPLOYEECANCELLEAVE();
                cancelLeave.CANCELLEAVEID = Guid.NewGuid().ToString();
                cancelLeave.CHECKSTATE = Convert.ToInt32(SMT.SaaS.FrameworkUI.CheckStates.UnSubmit).ToString();

                //出差记录只能本人申请
                cancelLeave.EMPLOYEEID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                cancelLeave.EMPLOYEENAME = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
                cancelLeave.EMPLOYEECODE = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeCode;


                //权限控制
                cancelLeave.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                cancelLeave.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                cancelLeave.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                cancelLeave.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;


                //2010年2月11日, 添加人信息
                cancelLeave.CREATEDATE = DateTime.Now;
                cancelLeave.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                cancelLeave.UPDATEDATE = System.DateTime.Now;
                cancelLeave.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                //添加人所属部门ID
                cancelLeave.CREATEPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                cancelLeave.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                cancelLeave.CREATECOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;

                //赋初始值
                tbOrgName.Text = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName + " - " + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName + " - " + SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName;
                tbEmpName.Text = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
              
                tbEmpLevel.Text = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostLevel.ToString();
                if (!string.IsNullOrWhiteSpace(tbOrgName.Text))
                {
                    tbEmpName.Text = tbEmpName.Text + " - " + tbOrgName.Text;
                }

                this.DataContext = cancelLeave;

                SetToolBar();
            }
            else
            {
                client.GetEmployeeCancelLeaveByIDAsync(CancelLeaveID);
                if (FormType == FormTypes.Browse)
                {
                    this.IsEnabled = false;
                }
            }
        }
Exemple #9
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEECANCELLEAVE Info)
        {
            //审核状态
            decimal? stateValue = Convert.ToDecimal("1");
            string checkState = string.Empty;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY checkStateDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "CHECKSTATE" && s.DICTIONARYVALUE == stateValue).FirstOrDefault();
            checkState = checkStateDict == null ? "" : checkStateDict.DICTIONARYNAME;

            //岗位级别
            decimal? postlevelValue = Convert.ToDecimal(tbEmpLevel.Text.Trim());
            string postLevelName = string.Empty;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY postLevelDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "POSTLEVEL" && s.DICTIONARYVALUE == postlevelValue).FirstOrDefault();
            postLevelName = postLevelDict == null ? "" : postLevelDict.DICTIONARYNAME;

            SMT.SaaS.MobileXml.MobileXml mx = new SMT.SaaS.MobileXml.MobileXml();
            List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>();
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTNAME", tbOrgName.Text.Trim(), tbOrgName.Text.Trim()));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "POSTLEVEL", tbEmpLevel.Text.Trim(), postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "ENTITYKEY", Info.CANCELLEAVEID, string.Empty));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }