void BenefitsAdministration_GetByIdWelfarePaymentDetailsCompleted(object sender, GetByIdWelfarePaymentDetailsCompletedEventArgs e)
        {
            try
            {
                if (e.Result != null)
                {
                    detailTemps = e.Result.ToList();

                    foreach (var detailTemp in detailTemps)//获取年月
                    {
                        distributeMaster = new T_OA_WELFAREDISTRIBUTEMASTER();
                        if (detailTemp != null)
                        {
                            distributeMaster = detailTemp.T_OA_WELFAREDISTRIBUTEMASTER;
                            delteWelfarePaymentDetail.Add(detailTemp.USERID);
                            Year  = Convert.ToDateTime(distributeMaster.DISTRIBUTEDATE).Year.ToString();  //年
                            Month = Convert.ToDateTime(distributeMaster.DISTRIBUTEDATE).Month.ToString(); //月
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
            }
        }
Ejemplo n.º 2
0
 [OperationContract]//根据申请ID获取申请信息
 public T_OA_WELFAREDISTRIBUTEMASTER GetProvisionById(string WelfareID)
 {
     using (WelfareProvisionBLL wpbll = new WelfareProvisionBLL())
     {
         T_OA_WELFAREDISTRIBUTEMASTER WelfareStandard = wpbll.GetWelfareProvisionById(WelfareID);
         return(WelfareStandard == null ? null : WelfareStandard);
     }
 }
Ejemplo n.º 3
0
 [OperationContract]//更新申请信息
 public string UpdateWelfareProvision(T_OA_WELFAREDISTRIBUTEMASTER WelfareStandardInfo)
 {
     using (WelfareProvisionBLL wpbll = new WelfareProvisionBLL())
     {
         string result = "";
         if (!wpbll.UpdateWelfareProvision(WelfareStandardInfo))
         {
             result = "修改数据失败!";
         }
         return(result);
     }
 }
Ejemplo n.º 4
0
 [OperationContract]//添加福利发放申请信息
 public string WelfareProvisionAdd(T_OA_WELFAREDISTRIBUTEMASTER WelfareProvision, List <T_OA_WELFAREDISTRIBUTEDETAIL> WelfareDetails)
 {
     using (WelfareProvisionBLL wpbll = new WelfareProvisionBLL())
     {
         string returnStr = "";
         if (!this.IsExistWelfareProvision(WelfareProvision.WELFAREDISTRIBUTETITLE, WelfareProvision.CONTENT))
         {
             if (!wpbll.WelfareProvisionAdd(WelfareProvision, WelfareDetails))
             {
                 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());
     }
 }
 void BenefitsAdministration_GetProvisionByIdCompleted(object sender, GetProvisionByIdCompletedEventArgs e)//根据发放ID查询
 {
     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", "WELFAREPROVISIONPAGE"));
                 return;
             }
             InfoObj = e.Result;
             if (actions == FormTypes.Resubmit)//重新提交
             {
                 InfoObj.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString();
             }
             this.ReleaseTime.Text = Convert.ToDateTime(InfoObj.DISTRIBUTEDATE).ToShortDateString(); //发放时间
             if (InfoObj.ISWAGE == "1")                                                              //是否随薪发?0:非随工资发 1:随工资发
             {
                 RedYes.IsChecked = true;
             }
             //if (actions == FormTypes.Audit)
             //{
             //    audit.XmlObject = DataObjectToXml<T_OA_WELFAREDISTRIBUTEMASTER>.ObjListToXml(InfoObj, "OA");
             //}
             BenefitsAdministration.GetByIdWelfarePaymentDetailsAsync(InfoObj.WELFAREDISTRIBUTEMASTERID);
             //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_WELFAREDISTRIBUTEMASTER();
             InfoObj.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString();
         }
         else
         {
             if (actions == FormTypes.Audit)
             {
                 actionFlag = DataActionFlag.SubmitComplete;
             }
             BenefitsAdministration.GetProvisionByIdAsync(welfareInfoID);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }
 void BenefitsAdministration_GetProvisionByIdCompleted(object sender, GetProvisionByIdCompletedEventArgs e)//根据发放ID查询
 {
     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)
             {
                 return;
             }
             distributeMaster    = e.Result;
             welfareInfoID       = distributeMaster.WELFAREDISTRIBUTEMASTERID;
             txtReleaseName.Text = distributeMaster.WELFAREDISTRIBUTETITLE;//福利发放名
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }
Ejemplo n.º 9
0
        /// <summary>
        /// 新增撤销申请
        /// </summary>
        /// <param name="WelfarePaymentWithdrawalView"></param>
        /// <returns></returns>
        public bool WelfarePaymentWithdrawalAdd(T_OA_WELFAREDISTRIBUTEUNDO WelfarePaymentWithdrawalView)
        {
            try
            {
                T_OA_WELFAREDISTRIBUTEMASTER Master = (from a in dal.GetObjects <T_OA_WELFAREDISTRIBUTEMASTER>()
                                                       where a.WELFAREDISTRIBUTEMASTERID == WelfarePaymentWithdrawalView.T_OA_WELFAREDISTRIBUTEMASTER.WELFAREDISTRIBUTEMASTERID
                                                       select a).FirstOrDefault();

                WelfarePaymentWithdrawalView.T_OA_WELFAREDISTRIBUTEMASTER = Master;
                WelfarePaymentWithdrawalView.CREATEDATE = Convert.ToDateTime(DateTime.Now.ToShortDateString());

                bool WithdrawalAdd = Add(WelfarePaymentWithdrawalView);
                if (WithdrawalAdd == true)
                {
                    return(true);
                }
            }
            catch (Exception ex)
            {
                Tracer.Debug("福利标准WelfarePaymentWithdrawalBLL-WelfarePaymentWithdrawalAdd" + System.DateTime.Now.ToString() + " " + ex.ToString());
                throw (ex);
            }
            return(false);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 根据传回的XML,添加福利发放信息
        /// </summary>
        /// <param name="xele"></param>
        private static string WelfareProvisionAdd(IEnumerable<XElement> eGFunc)
        {
            try
            {
                List<T_OA_WELFAREDISTRIBUTEDETAIL> WelfareDetails = new List<T_OA_WELFAREDISTRIBUTEDETAIL>();
                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_WELFAREDISTRIBUTEMASTER entity = new T_OA_WELFAREDISTRIBUTEMASTER();
                entity.WELFAREDISTRIBUTEMASTERID = 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.WelfareProvisionAdd(entity, WelfareDetails);
                return entity.WELFAREDISTRIBUTEMASTERID;
            }
            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;
            }
        }
 void BenefitsAdministration_GetProvisionByIdCompleted(object sender, GetProvisionByIdCompletedEventArgs e)//根据发放ID查询
 {
     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)
             {
                 return;
             }
             distributeMaster = e.Result;
             welfareInfoID = distributeMaster.WELFAREDISTRIBUTEMASTERID;
             txtReleaseName.Text = distributeMaster.WELFAREDISTRIBUTETITLE;//福利发放名
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }
        void BenefitsAdministration_GetByIdWelfarePaymentDetailsCompleted(object sender, GetByIdWelfarePaymentDetailsCompletedEventArgs e)
        {
            try
            {
                if (e.Result != null)
                {
                    detailTemps = e.Result.ToList();

                    foreach (var detailTemp in detailTemps)//获取年月
                    {
                        distributeMaster = new T_OA_WELFAREDISTRIBUTEMASTER();
                        if (detailTemp != null)
                        {
                            distributeMaster = detailTemp.T_OA_WELFAREDISTRIBUTEMASTER;
                            delteWelfarePaymentDetail.Add(detailTemp.USERID);
                            Year = Convert.ToDateTime(distributeMaster.DISTRIBUTEDATE).Year.ToString();//年
                            Month = Convert.ToDateTime(distributeMaster.DISTRIBUTEDATE).Month.ToString();//月
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
            }
        }
 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());
     }
 }
Ejemplo n.º 14
0
 [OperationContract]//添加福利发放申请信息
 public string WelfareProvisionAdd(T_OA_WELFAREDISTRIBUTEMASTER WelfareProvision, List<T_OA_WELFAREDISTRIBUTEDETAIL> WelfareDetails)
 {
     using (WelfareProvisionBLL wpbll = new WelfareProvisionBLL())
     {
         string returnStr = "";
         if (!this.IsExistWelfareProvision(WelfareProvision.WELFAREDISTRIBUTETITLE, WelfareProvision.CONTENT))
         {
             if (!wpbll.WelfareProvisionAdd(WelfareProvision, WelfareDetails))
             {
                 returnStr = "添加数据失败";
             }
         }
         return returnStr;
     }
 }
Ejemplo n.º 15
0
 [OperationContract]//更新申请信息
 public string UpdateWelfareProvision(T_OA_WELFAREDISTRIBUTEMASTER WelfareStandardInfo)
 {
     using (WelfareProvisionBLL wpbll = new WelfareProvisionBLL())
     {
         string result = "";
         if (!wpbll.UpdateWelfareProvision(WelfareStandardInfo))
         {
             result = "修改数据失败!";
         }
         return result;
     }
 }
Ejemplo n.º 16
0
 private void InitData()
 {
     try
     {
         if (actions == FormTypes.New)
         {
             InfoObj = new T_OA_WELFAREDISTRIBUTEMASTER();
             InfoObj.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString();
         }
         else
         {
             if (actions == FormTypes.Audit)
             {
                 actionFlag = DataActionFlag.SubmitComplete;
             }
             BenefitsAdministration.GetProvisionByIdAsync(welfareInfoID);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }
Ejemplo n.º 17
0
 void BenefitsAdministration_GetProvisionByIdCompleted(object sender, GetProvisionByIdCompletedEventArgs e)//根据发放ID查询
 {
     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", "WELFAREPROVISIONPAGE"));
                 return;
             }
             InfoObj = e.Result;
             if (actions == FormTypes.Resubmit)//重新提交
             {
                 InfoObj.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString();
             }
             this.ReleaseTime.Text = Convert.ToDateTime(InfoObj.DISTRIBUTEDATE).ToShortDateString();//发放时间
             if (InfoObj.ISWAGE == "1")//是否随薪发?0:非随工资发 1:随工资发
             {
                 RedYes.IsChecked = true;
             }
             //if (actions == FormTypes.Audit)
             //{
             //    audit.XmlObject = DataObjectToXml<T_OA_WELFAREDISTRIBUTEMASTER>.ObjListToXml(InfoObj, "OA");
             //}
             BenefitsAdministration.GetByIdWelfarePaymentDetailsAsync(InfoObj.WELFAREDISTRIBUTEMASTERID);
             //InitAudit();//获取审核控件的数据
             RefreshUI(RefreshedTypes.AuditInfo);
             RefreshUI(RefreshedTypes.All);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
     }
 }