Ejemplo n.º 1
0
 [OperationContract]//根据申请ID获取撤销记录
 public T_OA_WELFAREDISTRIBUTEUNDO GetWelfarePaymentWithdrawalById(string beingWithdrawnId)
 {
     using (WelfarePaymentWithdrawalBLL wpwl = new WelfarePaymentWithdrawalBLL())
     {
         T_OA_WELFAREDISTRIBUTEUNDO WelfarePaymentWithdrawal = wpwl.GetWelfarePaymentWithdrawalById(beingWithdrawnId);
         return(WelfarePaymentWithdrawal == null ? null : WelfarePaymentWithdrawal);
     }
 }
Ejemplo n.º 2
0
 [OperationContract]//更新申请信息
 public string UpdateWelfarePaymentWithdrawal(T_OA_WELFAREDISTRIBUTEUNDO WelfarePaymentWithdrawalView)
 {
     using (WelfarePaymentWithdrawalBLL wpwl = new WelfarePaymentWithdrawalBLL())
     {
         string result = "";
         if (!wpwl.UpdateWelfarePaymentWithdrawal(WelfarePaymentWithdrawalView))
         {
             result = "修改数据失败!";
         }
         return(result);
     }
 }
        private void Save()
        {
            try
            {
                if (Check())
                {
                    RefreshUI(RefreshedTypes.ShowProgressBar);                    //点击保存后显示进度条
                    string strContractCreated = DateTime.Now.ToShortDateString(); //创建时间

                    if (actions == FormTypes.New)
                    {
                        WelfarePaymentWithdrawalInfo = new T_OA_WELFAREDISTRIBUTEUNDO();
                        WelfarePaymentWithdrawalInfo.WELFAREDISTRIBUTEUNDOID      = System.Guid.NewGuid().ToString();            //撤销发放ID
                        WelfarePaymentWithdrawalInfo.T_OA_WELFAREDISTRIBUTEMASTER = distributeMaster;
                        WelfarePaymentWithdrawalInfo.TEL                = this.txtTELL.Text;                                     //联系电话
                        WelfarePaymentWithdrawalInfo.REMARK             = this.txtRemark.Text.ToString();                        //备注
                        WelfarePaymentWithdrawalInfo.CHECKSTATE         = Utility.GetCheckState(CheckStates.UnSubmit);           //审批状态
                        WelfarePaymentWithdrawalInfo.CREATEUSERID       = Common.CurrentLoginUserInfo.EmployeeID;                //创建人ID
                        WelfarePaymentWithdrawalInfo.CREATEUSERNAME     = Common.CurrentLoginUserInfo.EmployeeName;              //创建人姓名
                        WelfarePaymentWithdrawalInfo.OWNERID            = Common.CurrentLoginUserInfo.EmployeeID;                //所属用户ID
                        WelfarePaymentWithdrawalInfo.OWNERCOMPANYID     = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;    //所属公司ID
                        WelfarePaymentWithdrawalInfo.OWNERDEPARTMENTID  = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; //所属部门ID
                        WelfarePaymentWithdrawalInfo.OWNERPOSTID        = Common.CurrentLoginUserInfo.UserPosts[0].PostID;       //所属岗位ID
                        WelfarePaymentWithdrawalInfo.CREATECOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;    //创建公司ID
                        WelfarePaymentWithdrawalInfo.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; //创建部门ID
                        WelfarePaymentWithdrawalInfo.CREATEPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;       //创建岗位ID
                        WelfarePaymentWithdrawalInfo.OWNERNAME          = Common.CurrentLoginUserInfo.EmployeeName;              //所属用户姓名

                        BenefitsAdministration.WelfarePaymentWithdrawalAddAsync(WelfarePaymentWithdrawalInfo);
                    }
                    else
                    {
                        WelfarePaymentWithdrawalInfo.T_OA_WELFAREDISTRIBUTEMASTER = distributeMaster;
                        WelfarePaymentWithdrawalInfo.TEL            = this.txtTELL.Text;                           //联系电话
                        WelfarePaymentWithdrawalInfo.REMARK         = this.txtRemark.Text.ToString();              //备注
                        WelfarePaymentWithdrawalInfo.CHECKSTATE     = Utility.GetCheckState(CheckStates.UnSubmit); //审批状态
                        WelfarePaymentWithdrawalInfo.UPDATEUSERID   = Common.CurrentLoginUserInfo.EmployeeID;
                        WelfarePaymentWithdrawalInfo.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName;

                        BenefitsAdministration.UpdateWelfarePaymentWithdrawalAsync(WelfarePaymentWithdrawalInfo, "Edit");
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
                RefreshUI(RefreshedTypes.HideProgressBar);//关闭进度条动画
            }
        }
Ejemplo n.º 4
0
 [OperationContract]//添加福利发放撤销记录
 public string WelfarePaymentWithdrawalAdd(T_OA_WELFAREDISTRIBUTEUNDO WelfarePaymentWithdrawalView)
 {
     using (WelfarePaymentWithdrawalBLL wpwl = new WelfarePaymentWithdrawalBLL())
     {
         string returnStr = "";
         if (!wpwl.IsExistWelfarePaymentWithdrawal(WelfarePaymentWithdrawalView.WELFAREDISTRIBUTEUNDOID,
                                                   WelfarePaymentWithdrawalView.T_OA_WELFAREDISTRIBUTEMASTER.WELFAREDISTRIBUTEMASTERID))
         {
             if (!wpwl.WelfarePaymentWithdrawalAdd(WelfarePaymentWithdrawalView))
             {
                 returnStr = "添加数据失败";
             }
         }
         return(returnStr);
     }
 }
 void BenefitsAdministration_GetWelfarePaymentWithdrawalByIdCompleted(object sender, GetWelfarePaymentWithdrawalByIdCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message))
         {
             Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
         }
         else
         {
             if (e.Result == null)
             {
                 //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("DIDNOTFINDRELEVANT", "WELFAREPAYMENTWITHDRAWAL"));
                 return;
             }
             InfoObj = e.Result;
             if (actions == FormTypes.Resubmit)//重新提交
             {
                 InfoObj.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString();
             }
             distributeMaster          = InfoObj.T_OA_WELFAREDISTRIBUTEMASTER;                 //福利发放主表
             txtReleaseName.Text       = distributeMaster.WELFAREDISTRIBUTETITLE;              //福利发放名
             welfareInfoID             = distributeMaster.WELFAREDISTRIBUTEMASTERID;
             txtTELL.Text              = InfoObj.TEL;                                          //联系电话
             txtRemark.Text            = InfoObj.REMARK;                                       //备注
             this.txtRemoveName.Text   = InfoObj.OWNERNAME;                                    //撤销人姓名
             this.txtCompanyId.Text    = Utility.GetCompanyName(InfoObj.OWNERCOMPANYID);       //所属公司ID
             this.txtDepartmentId.Text = Utility.GetDepartmentName(InfoObj.OWNERDEPARTMENTID); //所属部门ID
             //if (actions == FormTypes.Audit)
             //{
             //    audit.XmlObject = DataObjectToXml<T_OA_WELFAREDISTRIBUTEUNDO>.ObjListToXml(InfoObj, "OA");
             //}
             BenefitsAdministration.GetByIdWelfarePaymentDetailsAsync(welfareInfoID);
             //InitAudit();//获取审核控件的数据
             RefreshUI(RefreshedTypes.AuditInfo);
             RefreshUI(RefreshedTypes.All);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }
 private void InitData()
 {
     try
     {
         if (actions == FormTypes.New)
         {
             InfoObj            = new T_OA_WELFAREDISTRIBUTEUNDO();
             InfoObj.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString();
         }
         else
         {
             if (actions == FormTypes.Audit)
             {
                 actionFlag = DataActionFlag.SubmitComplete;
             }
             BenefitsAdministration.GetWelfarePaymentWithdrawalByIdAsync(beingWithdrawnId);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// 根据传回的XML,添加福利发放撤销信息
        /// </summary>
        /// <param name="xele"></param>
        private static string WelfarePaymentWithdrawalAdd(IEnumerable<XElement> eGFunc)
        {
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return "";
                }
                string strEmployeeID = string.Empty;
                string strOwnerID = string.Empty;
                string strOwnerPostID = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                        case "CREATEUSERID":
                            strEmployeeID = q.Attribute("Value").Value;
                            break;
                        case "OWNERID":
                            strOwnerID = q.Attribute("Value").Value;
                            break;
                        case "OWNERPOSTID":
                            strOwnerPostID = q.Attribute("Value").Value;
                            break;
                        case "OWNERDEPARTMENTID":
                            strOwnerDepartmentID = q.Attribute("Value").Value;
                            break;
                        case "OWNERCOMPANYID":
                            strOwnerCompanyID = q.Attribute("Value").Value;
                            break;
                    }
                }
                SmtOADocumentAdmin doc = new SmtOADocumentAdmin();

                string employeeid = strEmployeeID.Replace("{", "").Replace("}", "");

                T_OA_WELFAREDISTRIBUTEUNDO entity = new T_OA_WELFAREDISTRIBUTEUNDO();
                entity.WELFAREDISTRIBUTEUNDOID = Guid.NewGuid().ToString();

                entity.CREATEDATE = DateTime.Now;
                entity.OWNERID = strOwnerID;
                entity.OWNERPOSTID = strOwnerPostID;
                entity.OWNERDEPARTMENTID = strOwnerDepartmentID;
                entity.OWNERCOMPANYID = strOwnerCompanyID;
                entity.CREATEUSERID = strOwnerID;
                entity.CREATEPOSTID = strOwnerPostID;
                entity.CREATEDEPARTMENTID = strOwnerDepartmentID;
                entity.CREATECOMPANYID = strOwnerCompanyID;
                doc.WelfarePaymentWithdrawalAdd(entity);
                return entity.WELFAREDISTRIBUTEUNDOID;
            }
            catch (Exception e)
            {
                string abc = "<OA>Message=[" + e.Message + "]" + "<OA>Source=[" + e.Source + "]<OA>StackTrace=[" + e.StackTrace + "]<OA>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return abc;
            }
        }
Ejemplo n.º 8
0
 [OperationContract]//更新申请信息
 public string UpdateWelfarePaymentWithdrawal(T_OA_WELFAREDISTRIBUTEUNDO WelfarePaymentWithdrawalView)
 {
     using (WelfarePaymentWithdrawalBLL wpwl = new WelfarePaymentWithdrawalBLL())
     {
         string result = "";
         if (!wpwl.UpdateWelfarePaymentWithdrawal(WelfarePaymentWithdrawalView))
         {
             result = "修改数据失败!";
         }
         return result;
     }
 }
Ejemplo n.º 9
0
 [OperationContract]//添加福利发放撤销记录
 public string WelfarePaymentWithdrawalAdd(T_OA_WELFAREDISTRIBUTEUNDO WelfarePaymentWithdrawalView)
 {
     using (WelfarePaymentWithdrawalBLL wpwl = new WelfarePaymentWithdrawalBLL())
     {
         string returnStr = "";
         if (!wpwl.IsExistWelfarePaymentWithdrawal(WelfarePaymentWithdrawalView.WELFAREDISTRIBUTEUNDOID,
             WelfarePaymentWithdrawalView.T_OA_WELFAREDISTRIBUTEMASTER.WELFAREDISTRIBUTEMASTERID))
         {
             if (!wpwl.WelfarePaymentWithdrawalAdd(WelfarePaymentWithdrawalView))
             {
                 returnStr = "添加数据失败";
             }
         }
         return returnStr;
     }
 }
 private void InitData()
 {
     try
     {
         if (actions == FormTypes.New)
         {
             InfoObj = new T_OA_WELFAREDISTRIBUTEUNDO();
             InfoObj.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString();
         }
         else
         {
             if (actions == FormTypes.Audit)
             {
                 actionFlag = DataActionFlag.SubmitComplete;
             }
             BenefitsAdministration.GetWelfarePaymentWithdrawalByIdAsync(beingWithdrawnId);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }
        private void Save()
        {
            try
            {
                if (Check())
                {
                    RefreshUI(RefreshedTypes.ShowProgressBar);//点击保存后显示进度条
                    string strContractCreated = DateTime.Now.ToShortDateString();//创建时间

                    if (actions == FormTypes.New)
                    {
                        WelfarePaymentWithdrawalInfo = new T_OA_WELFAREDISTRIBUTEUNDO();
                        WelfarePaymentWithdrawalInfo.WELFAREDISTRIBUTEUNDOID = System.Guid.NewGuid().ToString();//撤销发放ID
                        WelfarePaymentWithdrawalInfo.T_OA_WELFAREDISTRIBUTEMASTER = distributeMaster;
                        WelfarePaymentWithdrawalInfo.TEL = this.txtTELL.Text;//联系电话
                        WelfarePaymentWithdrawalInfo.REMARK = this.txtRemark.Text.ToString();//备注
                        WelfarePaymentWithdrawalInfo.CHECKSTATE = Utility.GetCheckState(CheckStates.UnSubmit);//审批状态
                        WelfarePaymentWithdrawalInfo.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID;//创建人ID
                        WelfarePaymentWithdrawalInfo.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName;//创建人姓名
                        WelfarePaymentWithdrawalInfo.OWNERID = Common.CurrentLoginUserInfo.EmployeeID;//所属用户ID
                        WelfarePaymentWithdrawalInfo.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;//所属公司ID
                        WelfarePaymentWithdrawalInfo.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;//所属部门ID
                        WelfarePaymentWithdrawalInfo.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID;//所属岗位ID
                        WelfarePaymentWithdrawalInfo.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;//创建公司ID
                        WelfarePaymentWithdrawalInfo.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;//创建部门ID
                        WelfarePaymentWithdrawalInfo.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID;//创建岗位ID
                        WelfarePaymentWithdrawalInfo.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName;//所属用户姓名

                        BenefitsAdministration.WelfarePaymentWithdrawalAddAsync(WelfarePaymentWithdrawalInfo);
                    }
                    else
                    {
                        WelfarePaymentWithdrawalInfo.T_OA_WELFAREDISTRIBUTEMASTER = distributeMaster;
                        WelfarePaymentWithdrawalInfo.TEL = this.txtTELL.Text;//联系电话
                        WelfarePaymentWithdrawalInfo.REMARK = this.txtRemark.Text.ToString();//备注
                        WelfarePaymentWithdrawalInfo.CHECKSTATE = Utility.GetCheckState(CheckStates.UnSubmit);//审批状态
                        WelfarePaymentWithdrawalInfo.UPDATEUSERID = Common.CurrentLoginUserInfo.EmployeeID;
                        WelfarePaymentWithdrawalInfo.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName;

                        BenefitsAdministration.UpdateWelfarePaymentWithdrawalAsync(WelfarePaymentWithdrawalInfo, "Edit");
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
                RefreshUI(RefreshedTypes.HideProgressBar);//关闭进度条动画
            }
        }
 void BenefitsAdministration_GetWelfarePaymentWithdrawalByIdCompleted(object sender, GetWelfarePaymentWithdrawalByIdCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message))
         {
             Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
         }
         else
         {
             if (e.Result == null)
             {
                 //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("DIDNOTFINDRELEVANT", "WELFAREPAYMENTWITHDRAWAL"));
                 return;
             }
             InfoObj = e.Result;
             if (actions == FormTypes.Resubmit)//重新提交
             {
                 InfoObj.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString();
             }
             distributeMaster = InfoObj.T_OA_WELFAREDISTRIBUTEMASTER;//福利发放主表
             txtReleaseName.Text = distributeMaster.WELFAREDISTRIBUTETITLE;//福利发放名
             welfareInfoID = distributeMaster.WELFAREDISTRIBUTEMASTERID;
             txtTELL.Text = InfoObj.TEL;//联系电话
             txtRemark.Text = InfoObj.REMARK;//备注
             this.txtRemoveName.Text = InfoObj.OWNERNAME;//撤销人姓名
             this.txtCompanyId.Text = Utility.GetCompanyName(InfoObj.OWNERCOMPANYID);//所属公司ID
             this.txtDepartmentId.Text = Utility.GetDepartmentName(InfoObj.OWNERDEPARTMENTID);//所属部门ID
             //if (actions == FormTypes.Audit)
             //{
             //    audit.XmlObject = DataObjectToXml<T_OA_WELFAREDISTRIBUTEUNDO>.ObjListToXml(InfoObj, "OA");
             //}
             BenefitsAdministration.GetByIdWelfarePaymentDetailsAsync(welfareInfoID);
             //InitAudit();//获取审核控件的数据
             RefreshUI(RefreshedTypes.AuditInfo);
             RefreshUI(RefreshedTypes.All);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }