예제 #1
0
        /// <summary>
        /// 2012-8-24
        /// xiedx
        /// 初始化按钮
        /// </summary>
        void _ImgButtonExecuteSalaryItemSql_Click(object sender, RoutedEventArgs e)
        {
            string          Result = "";
            ComfirmWindow   com    = new ComfirmWindow();
            T_HR_SALARYITEM temp   = new T_HR_SALARYITEM();

            temp.SALARYITEMID = Guid.NewGuid().ToString();
            if (string.IsNullOrWhiteSpace(companyID))
            {
                temp.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                companyName         = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName;
            }
            else
            {
                temp.OWNERCOMPANYID = companyID;
            }
            temp.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            temp.OWNERPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
            temp.OWNERID           = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
            temp.UPDATEUSERID      = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

            com.OnSelectionBoxClosed += (obj, result) =>
            {
                ObservableCollection <string> ids = new ObservableCollection <string>();
                client.ExecuteSalaryItemSqlAsync(temp);
            };

            com.SelectionBox(Utility.GetResourceStr("CAUTION"), "该选项会初始化 " + companyName + " 的薪资,请向相关部门确认先", ComfirmWindow.titlename, Result);
        }