public string UpdateHireApp(T_OA_HIREAPP hireAppObj) { using (HouseHireAppManagementBll houseHireAppBll = new HouseHireAppManagementBll()) { string returnStr = ""; if (!houseHireAppBll.UpdateHireApp(hireAppObj)) { returnStr = "修改数据失败"; } return(returnStr); } }
/// <summary> /// 通过引擎调用生成记录 20100714 /// </summary> /// <param name="hireappID"></param> public void GetHireAppToHireRecord(string hireappID) { try { var ents = from q in dal.GetObjects <T_OA_HIREAPP>() where q.HIREAPPID == hireappID select q; if (ents.Count() > 0) { T_OA_HIREAPP hireApp = new T_OA_HIREAPP(); hireApp = ents.FirstOrDefault(); T_OA_HIRERECORD hirerecord = new T_OA_HIRERECORD(); hirerecord.HIRERECORD = System.Guid.NewGuid().ToString(); hirerecord.RENTER = hireApp.RENTTYPE; hirerecord.T_OA_HIREAPP = hireApp; hirerecord.MANAGECOST = Convert.ToDecimal(hireApp.MANAGECOST); hirerecord.RENTCOST = Convert.ToDecimal(hireApp.RENTCOST); hirerecord.WATER = 0; hirerecord.ELECTRICITY = 0; hirerecord.OTHERCOST = 0; hirerecord.WATERNUM = 0; hirerecord.ELECTRICITYNUM = 0; hirerecord.SETTLEMENTDATE = System.DateTime.Now; hirerecord.SETTLEMENTTYPE = hireApp.SETTLEMENTTYPE; //付款方式 hirerecord.ISSETTLEMENT = "0"; //是否结算 hirerecord.CREATEUSERID = hireApp.CREATEUSERID; hirerecord.CREATEUSERNAME = hireApp.CREATEUSERNAME; hirerecord.CREATEPOSTID = hireApp.CREATEPOSTID; hirerecord.CREATEDEPARTMENTID = hireApp.CREATEDEPARTMENTID; hirerecord.CREATECOMPANYID = hireApp.CREATECOMPANYID; hirerecord.CREATEDATE = DateTime.Now; hirerecord.OWNERID = hireApp.OWNERID; hirerecord.OWNERNAME = hireApp.OWNERNAME; hirerecord.OWNERPOSTID = hireApp.OWNERPOSTID; hirerecord.OWNERDEPARTMENTID = hireApp.OWNERDEPARTMENTID; hirerecord.OWNERCOMPANYID = hireApp.OWNERCOMPANYID; int i = dal.Add(hirerecord); string StrReturn = ""; if (!(i > 0)) { StrReturn = "SAVEFAILED";//保存失败 } } } catch (Exception ex) { Tracer.Debug("房源租赁记录HouseHireRecord-GetHireAppToHireRecord" + System.DateTime.Now.ToString() + " " + ex.ToString()); //StrReturn= "SAVEFAILED"; } }
public string AddHireApp(T_OA_HIREAPP hireAppObj) { using (HouseHireAppManagementBll houseHireAppBll = new HouseHireAppManagementBll()) { string returnStr = ""; if (!houseHireAppBll.IsHired(hireAppObj.T_OA_HOUSELIST, hireAppObj.OWNERID)) { returnStr = houseHireAppBll.AddHireApp(hireAppObj); } else { returnStr = "HOUSEISOKNOTHIRE"; } return(returnStr); } }
private void InitData() { if (action == Action.Add) { this.sDate.SelectedDate = DateTime.Now; this.eDate.SelectedDate = DateTime.Now.AddYears(1); houseInfo = new T_OA_HOUSEINFO(); houseList = new V_HouseHireList(); hireApp = new T_OA_HIREAPP(); hireApp.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString(); } else { if (action == Action.AUDIT) { actionFlag = DataActionFlag.SubmitComplete; } client.GetHireAppByIDAsync(hireAppID); } if (checkState != ((int)CheckStates.UnSubmit).ToString() && checkState != ((int)CheckStates.UnApproved).ToString() && FromFormFlag == "0") //只有未提交和未通过才能修改 { if (action != Action.Add) { SetReadOnly(); } } else { SetToolBar(); } //if (action == Action.Return) //{ // //SetReturnBar(); // this.sDate.IsEnabled = false; // this.eDate.IsEnabled = false; // this.rbtPay.IsEnabled = false; // this.RbtShared.IsEnabled = false; // this.rbtWhole.IsEnabled = false; // this.RbtCash.IsEnabled = false; //} }
private void client_GetHireAppByIDCompleted(object sender, GetHireAppByIDCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); try { if (e.Error == null) { if (e.Result != null) { if (actionFlag == DataActionFlag.SubmitFlow) { //SumbitFlow(); return; } else { hireApp = e.Result.ToList()[0]; client.GetHireAppByHouseListIDAsync(hireApp.T_OA_HOUSELIST.HOUSELISTID); } this.sDate.SelectedDate = hireApp.STARTDATE; this.eDate.SelectedDate = hireApp.ENDDATE; this.bDate.SelectedDate = hireApp.BACKDATE; if (action == Action.AUDIT) { //audit.XmlObject = DataObjectToXml<T_OA_HIREAPP>.ObjListToXml(hireApp, "OA"); } //BindAduitInfo(); RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); } } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message); } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString()); } }
/// <summary> /// 根据传回的XML,添加租房申请 /// </summary> /// <param name="xele"></param> private static string HireappAdd(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; } } string employeeid = strEmployeeID.Replace("{", "").Replace("}", ""); T_OA_HIREAPP entity = new T_OA_HIREAPP(); HouseInfoManagerBll houseBll = new HouseInfoManagerBll(); int pageCount = 1; List<T_OA_HOUSEINFO> ent = houseBll.QueryWithPaging(1, 1, string.Empty, string.Empty, null, ref pageCount, strEmployeeID, "T_OA_HOUSEINFO").ToList(); List<T_OA_HOUSELIST> hlist = ent[0].T_OA_HOUSELIST.ToList(); entity.T_OA_HOUSELIST = hlist[0]; entity.HIREAPPID = 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; List<T_OA_DISTRIBUTEUSER> distributeLists = new List<T_OA_DISTRIBUTEUSER>(); HouseHireAppManagementBll houseHireAppBll = new HouseHireAppManagementBll(); if (!houseHireAppBll.IsHired(entity.T_OA_HOUSELIST, entity.OWNERID)) { houseHireAppBll.AddHireApp(entity); return entity.HIREAPPID; } else { string err = "Error"; return err; } } 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; } }
public string UpdateHireApp(T_OA_HIREAPP hireAppObj) { using (HouseHireAppManagementBll houseHireAppBll = new HouseHireAppManagementBll()) { string returnStr = ""; if (!houseHireAppBll.UpdateHireApp(hireAppObj)) { returnStr = "修改数据失败"; } return returnStr; } }
public string AddHireApp(T_OA_HIREAPP hireAppObj) { using (HouseHireAppManagementBll houseHireAppBll = new HouseHireAppManagementBll()) { string returnStr = ""; if (!houseHireAppBll.IsHired(hireAppObj.T_OA_HOUSELIST, hireAppObj.OWNERID)) { returnStr = houseHireAppBll.AddHireApp(hireAppObj); } else { returnStr = "HOUSEISOKNOTHIRE"; } return returnStr; } }