public static T_FB_PERSONACCOUNT CreateT_FB_PERSONACCOUNT(string pERSONACCOUNTID, string oWNERID, string oWNERPOSTID, string oWNERDEPARTMENTID, string oWNERCOMPANYID) { T_FB_PERSONACCOUNT t_FB_PERSONACCOUNT = new T_FB_PERSONACCOUNT(); t_FB_PERSONACCOUNT.PERSONACCOUNTID = pERSONACCOUNTID; t_FB_PERSONACCOUNT.OWNERID = oWNERID; t_FB_PERSONACCOUNT.OWNERPOSTID = oWNERPOSTID; t_FB_PERSONACCOUNT.OWNERDEPARTMENTID = oWNERDEPARTMENTID; t_FB_PERSONACCOUNT.OWNERCOMPANYID = oWNERCOMPANYID; return t_FB_PERSONACCOUNT; }
//获取相应人员的借款 public void GetPersonAccountData() { if (leftOffice == null) { return; } if (string.IsNullOrWhiteSpace(LeftOffice.OWNERCOMPANYID)) { return; } if (leftOffice.T_HR_EMPLOYEE == null) { return; } T_FB_PERSONACCOUNT temp = new T_FB_PERSONACCOUNT(); string filter = ""; //查询过滤条件 ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); //参数值 if (!string.IsNullOrEmpty(LeftOffice.OWNERCOMPANYID)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "@" + paras.Count().ToString() + ".Contains(OWNERCOMPANYID) "; paras.Add(LeftOffice.OWNERCOMPANYID); } if (!string.IsNullOrEmpty(leftOffice.T_HR_EMPLOYEE.EMPLOYEEID)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "@" + paras.Count().ToString() + ".Contains(OWNERID) "; paras.Add(leftOffice.T_HR_EMPLOYEE.EMPLOYEEID); } DMClient.GetPersonAccountListByMultSearchAsync(filter, paras, "OWNERID"); }
public void AddToT_FB_PERSONACCOUNT(T_FB_PERSONACCOUNT t_FB_PERSONACCOUNT) { base.AddObject("T_FB_PERSONACCOUNT", t_FB_PERSONACCOUNT); }
void client_GetPersonAccountListByMultSearchCompleted(object sender, GetPersonAccountListByMultSearchCompletedEventArgs e) { T_FB_PERSONACCOUNT PerEntity = new T_FB_PERSONACCOUNT(); try { chaRepDtlobj.Clear(); if (e.Error == null) { if (e.Result != null && e.Result.Count > 0) { PerEntity = e.Result.FirstOrDefault(); if (PerEntity.SIMPLEBORROWMONEY > 0) { T_FB_CHARGEAPPLYREPAYDETAIL repay = new T_FB_CHARGEAPPLYREPAYDETAIL(); repay.BORROWMONEY = PerEntity.SIMPLEBORROWMONEY.Value; repay.CREATEDATE = DateTime.Now; repay.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; repay.REMARK = ""; repay.CHARGEAPPLYREPAYDETAILID = System.Guid.NewGuid().ToString(); repay.REPAYMONEY = 0; repay.REPAYTYPE = 1; repay.UPDATEDATE = DateTime.Now; repay.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; chaRepDtlobj.Add(repay); } if (PerEntity.BACKUPBORROWMONEY > 0) { T_FB_CHARGEAPPLYREPAYDETAIL repay = new T_FB_CHARGEAPPLYREPAYDETAIL(); repay.BORROWMONEY = PerEntity.BACKUPBORROWMONEY.Value; repay.CREATEDATE = DateTime.Now; repay.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; repay.REMARK = ""; repay.CHARGEAPPLYREPAYDETAILID = System.Guid.NewGuid().ToString(); repay.REPAYMONEY = 0; repay.REPAYTYPE = 2; repay.UPDATEDATE = DateTime.Now; repay.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; chaRepDtlobj.Add(repay); } if (PerEntity.SPECIALBORROWMONEY > 0) { T_FB_CHARGEAPPLYREPAYDETAIL repay = new T_FB_CHARGEAPPLYREPAYDETAIL(); repay.BORROWMONEY = PerEntity.SPECIALBORROWMONEY.Value; repay.CREATEDATE = DateTime.Now; repay.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; repay.REMARK = ""; repay.CHARGEAPPLYREPAYDETAILID = System.Guid.NewGuid().ToString(); repay.REPAYMONEY = 0; repay.REPAYTYPE = 3; repay.UPDATEDATE = DateTime.Now; repay.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; chaRepDtlobj.Add(repay); } } dgvRepayDetailList.ItemsSource = chaRepDtlobj; } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString()); } }