protected override void OnPreInit(EventArgs e) { #region 加载参数 HouseID.Value = Request["HouseID"]; House = H_houseinfor.FindByHouseID((Decimal)HouseID.Value.ToInt32()); if (House == null) { Response.Write("参数错误!"); Response.End(); } if (Request.QueryString["GU_ID"] != null && Request.QueryString["GU_ID"].ToString() != "") { GU_ID.Value = Request.QueryString["GU_ID"].ToString(); } IsShowTel = Request.QueryString["a"] != null; IsCanShowTel = CheckRolePermission("查看电话"); //出售 //if (House.aType == 0) //{ // IsCanShowTel = H_houseinfor.CanShowTel(House.HouseID, Employee.Current.EmployeeID.ToString().ToInt32(), 50); //} ////出租 //else //{ // IsCanShowTel = H_houseinfor.CanShowTel(House.HouseID, Employee.Current.EmployeeID.ToString().ToInt32(), 480); //} #endregion 加载参数 base.OnPreInit(e); }
protected override void OnSetForm(object sender, EntityFormEventArgs e) { H_houseinfor hh = H_houseinfor.FindByHouseID(Entity.houseID); houseid.Value = hh.HouseID.ToString(); employeeID_Pro.Value = hh.OwnerEmployeeID.ToString(); if (hh != null) { frmshi_id.Text = hh.Shi_id; } if (Entity.hProID > 0) { //房源核验 frmh_Check.Checked = Entity.h_Check.ToBool(); //户型图 frmh_hxt.Checked = Entity.h_hxt.ToBool(); //室内外图 frmh_pic.Checked = Entity.h_pic.ToBool(); employeeID_Finish.Value = Current.EmployeeID.ToString(); Employee ee = Employee.FindByEmployeeID(Current.EmployeeID); frmemployeeID_FinishName.Text = ee.Em_name; tr1.Visible = tr2.Visible = true; } else { tr1.Visible = tr2.Visible = false; } base.OnSetForm(sender, e); }
protected override void OnSaving(object sender, EntityFormEventArgs e) { if (Request.Form["frmImgPic"] != "") { if (Request.Form["Hid"] != null) { decimal cid = Convert.ToDecimal(Request.Form["C.CustomerID"]); int hid = Convert.ToInt32(Request.Form["Hid"]); H_houseinfor h = H_houseinfor.FindByHouseID(hid); if (h != null) { //带看凭证 Entity.ImgPic = Request.Form["frmImgPic"]; //操作人 Entity.EmployeeID = Employee.Current.EmployeeID; //状态、 Entity.HouseState = int.Parse(ffrmHouseState.SelectedValue); //房源ID Entity.HouseID = hid; //责任人 Entity.ZRempID = Request.Form["f.frmEscortEmployeeID1"].ToDecimal(); //时间 Entity.Exe_date = DateTime.Now; Entity.Update(); //房源状态改为选择的状态 h.EntrustTypeID = Entity.HouseState; h.Update(); } else { Response.Write("<script>alertMsg.error('参数错误,请重新操作')</script>"); //取消执行 e.Cancel = true; return; } } else { Response.Write("<script>alertMsg.error('参数错误,请重新操作')</script>"); //取消执行 e.Cancel = true; return; } } else { Response.Write("<script>alertMsg.error('操作失败!请上传带看凭证')</script>"); //取消执行 e.Cancel = true; return; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["LSH"] != null) { LSH.Value = Request.QueryString["LSH"]; } h_HouseTelList hTel = h_HouseTelList.FindByLSH(Convert.ToDecimal(Request.QueryString["LSH"])); H_houseinfor hh = H_houseinfor.FindByHouseID(hTel.HouseID); txtMsg.Text = "房东你好,我是" + (Current.OrgName.Contains("易房") ? "易房" : "中山") + "房产员工,现有客户准备去看你" + hh.HouseDicName + "的房屋,想和你确认什么时间方便看房"; } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; if (context.Request["HouseID"] != null && context.Request["HouseID"] != "0") { try { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(context.Request["HouseID"])); bool igr = false; if (context.Request["num"].ToString() == "1") { igr = true; } hh.IsGetRent = igr; hh.Update_date = DateTime.Now; hh.Update(); context.Response.Write("1"); } catch { context.Response.Write("2"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { myffrmddlAudit.Items.Clear(); myffrmddlAudit.Items.Add(""); myffrmddlAudit.Items.Add(new ListItem("未审核", "0")); myffrmddlAudit.Items.Add(new ListItem("已审核", "1")); myffrmddlAudit.SelectedIndex = 1; } z_bottom = "<li><a class=\"iconL\" href=\"House/FollowAuditList.aspx?doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>审核</span></a></li>"; if (CheckRolePermission("删除")) { z_del = "<li><a class=\"delete\" href=\"House/FollowAuditList.aspx?doType=del&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要删除吗?\"><span>删除</span></a></li>"; } if (Request.QueryString["doType"] != null) { //审核状态 if (Request.QueryString["doType"].ToString() == "upDateHouse") { if (!string.IsNullOrEmpty(Request["ids"])) { string sql = string.Format("select * from h_FollowAudit where FollowAuditID in({0})", Request["ids"]); List <h_FollowAudit> list_h_FollowAudit = h_FollowAudit.FindAll(sql); foreach (h_FollowAudit hfa in list_h_FollowAudit) { //房源跟进中增加修改状态 if (DbHelperSQL.ExecuteSql("exec dbo.h_update_HouseState " + hfa.StateID + ", " + hfa.HouseID + ", " + hfa.EmployeeID) > 0) { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hfa.HouseID)); //判断房源原先的状态(非委托中)改为委托中,并且当前日期已经大于房源的更新时间超过15天(不包括15天) if (hh.StateID != 2 && hfa.StateID == 2 && (DateTime.Now - hh.Update_date).TotalDays > 15) { //需要重新获取实体,因为在存储过程中,已经更新过 hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hfa.HouseID)); Employee emp = Employee.FindByEmployeeID(hfa.EmployeeID); //增加跟进记录 h_FollowUp hsf = new h_FollowUp(); hsf.EmployeeID = hfa.EmployeeID; hsf.HouseID = hfa.HouseID; hsf.FollowUpText = hfa.FollowText; hsf.exe_Date = hfa.CreateTime; hsf.Insert(); //更新该房源的首录人,用于统计员工新增房源工作量 hh.OwnerEmployeeID = Convert.ToInt32(emp.EmployeeID); hh.OperatorID = Convert.ToInt32(emp.EmployeeID); hh.OrgID = Convert.ToInt32(emp.OrgID); hh.Exe_date = hfa.CreateTime; } hh.Update_date = hfa.CreateTime; hh.Update(); hfa.AuditEmpID = Current.EmployeeID.ToString().ToInt32(); hfa.AuditTime = DateTime.Now; hfa.Update(); } } } } else if (Request.QueryString["doType"].ToString() == "del") { if (!string.IsNullOrEmpty(Request["ids"])) { DbHelperSQL.ExecuteSql("delete from h_FollowAudit where FollowAuditID in(" + Request["ids"] + ")"); } } #region 刷新当前页[抓取当页导航数字onclick事件] string JavaScript = " dwzPageBreak({ targetType: \"navTab\", rel: \"\", data: { pageNum: " + Request["selectPage"] + "} });"; JSDo_UserCallBack_Success(JavaScript, "操作成功"); #endregion 刷新当前页[抓取当页导航数字onclick事件] } }
/// <summary> /// 表单提交前执行 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void OnSaving(object sender, EntityFormEventArgs e) { //base.OnSaving(sender, e); if (Request.Form["Key"] != null) { HouseID = Request["Key"]; Entity.HouseID = Convert.ToDecimal(HouseID); Entity.EmployeeID = Employee.Current.EmployeeID; Entity.FollowUpText = "此房源照片及描述被信息部驳回,原因为:" + frmRemark.Text; Entity.exe_Date = DateTime.Now; //删除全部照片 List <h_PicList> list_h_PicList = h_PicList.FindAllByHouseID(HouseID.ToDecimal().Value); foreach (h_PicList item in list_h_PicList) { h_PicListDel list_h_PicListDel = new h_PicListDel(); list_h_PicListDel.ComID = item.ComID; list_h_PicListDel.EmployeeID = item.EmployeeID; list_h_PicListDel.Exe_date = item.exe_date; list_h_PicListDel.HouseID = item.HouseID; list_h_PicListDel.PicTypeID = item.PicTypeID; list_h_PicListDel.PicURL = item.PicURL; list_h_PicListDel.OrgID = item.OrgID; list_h_PicListDel.DelEmployeeID = Current.EmployeeID.ToInt32(); list_h_PicListDel.DelOrgID = Current.OrgID.ToInt32(); list_h_PicListDel.DelDate = DateTime.Now; list_h_PicListDel.Insert(); } DbHelperSQL.ExecuteSql("delete from h_PicList where HouseID= " + HouseID); H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(HouseID)); hh.HasImage = false; hh.IsSh = null; hh.LinkTel1 = null; hh.SeeHouseID = null; hh.NowStateID = null; hh.TaxesID = null; hh.AssortID = null; hh.SaleMotiveID = null; hh.ApplianceID = null; hh.PayServantID = null; hh.Update(); Log log1 = new Log(); log1.Action = "删除"; log1.Category = "删除房源照片"; log1.IP = HttpContext.Current.Request.UserHostAddress; log1.OccurTime = DateTime.Now; log1.UserID = Convert.ToInt32(Employee.Current.EmployeeID); log1.UserName = Employee.Current.Em_name; log1.Remark = "房源ID=" + HouseID; log1.Insert(); try { h_FollowUp.Meta.BeginTrans(); Entity.Insert(); H_houseinfor.Meta.Execute("update h_houseinfor set IsBh=1 where HouseID=" + Entity.HouseID.ToString()); h_FollowUp.Meta.Commit(); } catch { h_FollowUp.Meta.Rollback(); Response.Write(error()); e.Cancel = true; return; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { myffrmHandlingResults.Items.Clear(); myffrmHandlingResults.Items.Add(new ListItem("全部", "2")); myffrmHandlingResults.Items.Add(new ListItem("未审核", "0")); myffrmHandlingResults.Items.Add(new ListItem("已审核", "1")); if (!GetMySearchControlValue("HandlingResults").IsNullOrWhiteSpace()) { myffrmHandlingResults.SelectedValue = GetMySearchControlValue("HandlingResults"); } else { myffrmHandlingResults.SelectedIndex = 1; } myffrmstate.Items.Clear(); myffrmstate.Items.Add(new ListItem("全部", "2")); myffrmstate.Items.Add(new ListItem("确认", "0")); myffrmstate.Items.Add(new ListItem("投诉", "1")); if (!GetMySearchControlValue("state").IsNullOrWhiteSpace()) { myffrmstate.SelectedValue = GetMySearchControlValue("state"); } else { myffrmstate.SelectedIndex = 2; } } z_bottom = "<li><a class=\"iconL\" href=\"House/HousePriceComplaint.aspx?Type=1&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报通过</span></a></li>"; z_bottom += "<li><a class=\"iconL\" href=\"House/HousePriceComplaint.aspx?Type=0&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报不通过</span></a></li>"; if (CheckRolePermission("删除")) { z_del = "<li><a class=\"delete\" href=\"House/HousePriceComplaint.aspx?doType=del&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要删除吗?\"><span>删除</span></a></li>"; } if (Request.QueryString["doType"] != null) { //投诉通过状态 if (Request.QueryString["doType"].ToString() == "upDateHouse") { if (!string.IsNullOrEmpty(Request["ids"])) { string sql = string.Format("select * from h_PriceComplaint where ID in({0})", Request["ids"]); List <h_PriceComplaint> list_h_PriceComplaint = h_PriceComplaint.FindAll(sql); foreach (h_PriceComplaint hpc in list_h_PriceComplaint) { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hpc.houseID)); if (Request.QueryString["Type"].ToString() == "1") { //原始价格维护人 Employee ee = Employee.FindByEmployeeID(hpc.priceEmpID); //增加房源跟进 h_FollowUp hsf = new h_FollowUp(); hsf.EmployeeID = hpc.priceEmpID; hsf.HouseID = hpc.houseID; hsf.FollowUpText = "房源价格维护人:" + ee.Em_name + "→" + hpc.EmployeeName; hsf.Insert(); h_PriceFollowUp hpf = h_PriceFollowUp.FindByKey(hpc.h_PriceFollowUpID); if (hpf != null) { hpf.State = 1; hpf.Update(); } sql = string.Format(@"update h_houseinfor set update_date='{0}' where HouseID={1}", hpc.createTime, hpc.houseID); DbHelperSQL.ExecuteSql(sql); Common.MsgPush.PushMsg("房源价格维护:" + hh.Shi_id + " 的投诉——审核通过!", new string[] { hpc.priceEditEmpID.ToString() }, (int)Common.msgType.价格维护); } else if (Request.QueryString["Type"].ToString() == "0") { h_PriceFollowUp hpf = h_PriceFollowUp.FindByKey(hpc.h_PriceFollowUpID); if (hpf != null) { hpf.State = 0; hpc.Update(); } Common.MsgPush.PushMsg("房源价格维护:" + hh.Shi_id + " 的投诉——审核未通过!", new string[] { hpc.priceEditEmpID.ToString() }, (int)Common.msgType.价格维护); } hpc.HandlingResults = Request.QueryString["Type"].ToString() == "1" ? true : false; hpc.HandlingEmpID = Convert.ToInt32(Current.EmployeeID); hpc.HandlingTime = DateTime.Now; hpc.Update(); } } } else if (Request.QueryString["doType"].ToString() == "del") { if (!string.IsNullOrEmpty(Request["ids"])) { DbHelperSQL.ExecuteSql("delete from h_PriceComplaint where ID in(" + Request["ids"] + ")"); } } #region 刷新当前页[抓取当页导航数字onclick事件] string JavaScript = " dwzPageBreak({ targetType: \"navTab\", rel: \"\", data: { pageNum: " + Request["selectPage"] + "} });"; JSDo_UserCallBack_Success(JavaScript, "操作成功"); #endregion } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request["Name"] != null) { //照片分类ID string PicTypeID = Request["PicTypeID"].ToString(); //上传的文件夹 string Path = Request["Path"].ToString(); //上传文件名 string Name = Request["Name"].ToString(); //房源ID string HouseID = Request["HouseID"].ToString(); //人员ID string EmployeeID = Request["EmployeeID"]; if (PicTypeID != "0") { string suburl = ImageHelper.GetDbPath(Path, Name); string allurl = ImageHelper.GetUrl(suburl); h_PicList h_PicList = new h_PicList(); h_PicList.PicURL = suburl; h_PicList.PicTypeID = PicTypeID.ToDecimal().Value; if (string.IsNullOrEmpty(EmployeeID) || EmployeeID == "0") { h_PicList.OrgID = Current.OrgID.ToInt32().Value; h_PicList.EmployeeID = Current.EmployeeID.ToInt32().Value; } else { h_PicList.OrgID = int.Parse(Employee.FindByEmployeeID(Convert.ToDecimal(EmployeeID)).OrgID.ToString()); h_PicList.EmployeeID = int.Parse(EmployeeID); } h_PicList.HouseID = HouseID.ToDecimal().Value; h_PicList.Insert(); Log log1 = new Log(); log1.Action = "上传房源照片"; log1.Category = "上传房源照片"; log1.IP = HttpContext.Current.Request.UserHostAddress; log1.OccurTime = DateTime.Now; log1.UserID = Convert.ToInt32(Employee.Current.EmployeeID); log1.UserName = Employee.Current.Em_name; log1.Remark = string.Format("房源ID={0},房源编号={1}", HouseID, H_houseinfor.FindByHouseID(HouseID.ToInt32()).Shi_id); log1.Insert(); H_houseinfor hh = H_houseinfor.FindByHouseID(HouseID.ToDecimal().Value); if (hh != null) { hh.Update_date = DateTime.Now; hh.HasImage = true; hh.Update(); #region 出租积分 上传满5张照片即有积分 //租房并且不是毛坯有积分 if (hh.aType == 1 && hh.Renovation != "毛坯") { string sql = string.Format(@"SELECT count(1) FROM h_PicList Where PicTypeID>1 And EmployeeID={0} And HouseID={1}", Employee.Current.EmployeeID, HouseID); if (EntityUtils.DBUtility.DbHelperSQL.GetSingle(sql).ToInt32() >= 5) { UpdateIntegral("上传5张房源照片(租)", DateTime.Now, "H_houseinfor", "HouseID", HouseID); } } #endregion } Response.Write(allurl + "|" + Employee.Current.OrgCode + Employee.Current.OrgName + "-" + Employee.Current.Em_id + Employee.Current.Em_name + " 日期:" + DateTime.Now.ToString()); } else { //if (CheckRolePermission("上传全景照片")) //{ //h_PicList.Meta.Query("insert into h_AllViewPic(Url,EmployeeID,HouseID) values('/UploadFiles/housePIC/" + Request["Name"] + "'," + Employee.Current.EmployeeID + "," + Request["HouseID"] + ")"); //H_houseinfor.Meta.Query("update H_houseinfor set HasImage=1 where HouseID=" + Request["HouseID"]); //h_FollowUp En = new h_FollowUp(); //En.HouseID = Convert.ToDecimal(Request["HouseID"]); //En.EmployeeID = Employee.Current.EmployeeID; //En.FollowUpText = "添加全景照片"; //En.exe_Date = DateTime.Now; //En.Insert(); //UpdateIntegral("添加全景照片", DateTime.Now, "h_AllViewPic", "HouseID", Request["HouseID"]); //Response.Write(Employee.Current.OrgCode + Employee.Current.OrgName + "-" + Employee.Current.Em_id + Employee.Current.Em_name + " 日期:" + DateTime.Now.ToString()); //} //else //{ Response.Write("2"); //} } } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string html = context.Request["HTML"].Replace(",", " and"); if (html.IndexOf("Build_area") > 0) { if (context.Request["Build_area"] != null) { html = html.Replace("@Build_area", EntityUtils.StringHelper.Filter(context.Request["Build_area"])); } } if (html.IndexOf("sum_price") > 0) { if (context.Request["sum_price"] != null) { html = html.Replace("@sum_price", EntityUtils.StringHelper.Filter(context.Request["sum_price"])); } } if (html.IndexOf("HouseDicName") > 0) { if (context.Request["HouseDicName"] != null) { html = html.Replace("@HouseDicName", "'" + EntityUtils.StringHelper.Filter(context.Request["HouseDicName"]) + "'"); } } if (html.IndexOf("HouseDicAddress") > 0) { //html = html.Replace("@HouseDicAddress", "'" + HouseMIS.EntityUtils.StringHelper.Filter(context.Request["HouseDicAddress"]) + "'"); html = html.Replace("HouseDicAddress=@HouseDicAddress", ""); } if (html.IndexOf("build_id") > 0) { //判断栋座去除0后长度是否为空 if (context.Request["build_id"] != null && context.Request["build_id"].TrimStart('0').Length > 0) { html = html.Replace("@build_id", "'" + context.Request["build_id"].TrimStart('0') + "'"); } else { html = html.Replace("@build_id", "'0'"); } } if (html.IndexOf("build_unit") > 0) { html = html.Replace("@build_unit", "'" + EntityUtils.StringHelper.Filter(context.Request["build_unit"]) + "'"); } if (html.IndexOf("build_room") > 0) { //判断室号去除0后长度是否为空 if (context.Request["build_room"] != null && context.Request["build_room"].TrimStart('0').Length > 0) { html = html.Replace("@build_room", "'" + context.Request["build_room"].TrimStart('0') + "'"); } else { html = html.Replace("@build_room", "'0'"); } } if (html.IndexOf("landlord_name") > 0) { html = html.Replace("@landlord_name", "'" + EntityUtils.StringHelper.Filter(context.Request["landlord_name"]) + "'"); } if (html.IndexOf("landlord_tel2") > 0) { if (context.Request["landlord_tel2"] == "" || context.Request["landlord_tel2"].IndexOf("点击") > -1 || context.Request["landlord_tel2"].IndexOf("拨") > -1) { html = html.Replace("landlord_tel2=@landlord_tel2", "1=1"); } else { string ids = H_houseinfor.FindHouseIDsByTel(context.Request["landlord_tel2"].ToString()); if (ids.IsNullOrWhiteSpace()) { html = html.Replace("landlord_tel2=@landlord_tel2", "1=1"); } else { html = html.Replace("landlord_tel2=@landlord_tel2", "HouseID in (" + ids + ")"); } } } if (int.Parse(context.Request["HouseID"]) > 0) { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(context.Request["HouseID"])); if (context.Request["build_id"] == "") { html = html.Replace("@build_id", "'" + hh.Build_id + "'"); } if (context.Request["build_room"] == "") { html = html.Replace("@build_room", "'" + hh.Build_room + "'"); } if (context.Request["build_unit"] == "") { html = html.Replace("@build_unit", "'" + hh.Build_unit + "'"); } html += " and HouseID<>" + context.Request["HouseID"]; } if (context.Request["aType"] != null) { //判断小区+地址+楼栋号+室号是否重复,并且不是回收站房源,新增修改重复时不允许录入或者修改 string sql = "select count(1) from h_houseinfor where " + html + " and DelType=0 and aType=" + context.Request["aType"]; int bal = Convert.ToInt32(EntityUtils.DBUtility.DbHelperSQL.GetSingle(sql)); if (bal > 0) { context.Response.Write("1"); } else { context.Response.Write("0"); } } }
protected void Page_Load(object sender, EventArgs e) { e_Alteration alter = e_Alteration.Find("EmployeeID=" + Employee.Current.EmployeeID); if (!IsPostBack) { //if (Request["shi_addr"] != null) //{ // H_houseinfor hh = H_houseinfor.FindByHouseID(Request["HouseID"].ToDecimal().Value); // string PingGuJia = hh.PingGuJia.ToString(); // if (PingGuJia != Request.Form["shi_addr"]) // { // if (Convert.ToDecimal(Request["shi_addr"]) > 0) // s_HouseDicFloorPrice.SetFloorPrice(hh.HouseDicID, hh.Build_id, hh.Build_floor, Request["shi_addr"].ToDecimal().Value, hh.HouseID, true); // } //} if (Request["hid"] != null && Request["uid"] != null) { int iH = Convert.ToInt32(Request["hid"]), iU = Convert.ToInt32(Request["uid"]); SelectBuilder sb = new SelectBuilder(); sb.Table = "h_SeeTelLog"; sb.Where = string.Format("EmployeeID={0} and HouseID={1} and SheBei in ('101','102') and CONVERT(DATE,exe_date,120)='" + DateTime.Now.ToString("yyyy-MM-dd") + "'", iU, iH); //当日查看相同房源不算次数 if (h_SeeTelLog.Meta.QueryCount(sb) == 0) { H_houseinfor hou = H_houseinfor.FindByHouseID(iH); //出售房源 if (hou.aType == 0) { H_houseinfor.Meta.Execute(string.Format("insert into h_SeeTelLog(HouseID,EmployeeID,SheBei,ComID) values({0},{1},101,{2})", iH, iU, Employee.Current.ComID)); } else { H_houseinfor.Meta.Execute(string.Format("insert into h_SeeTelLog(HouseID,EmployeeID,SheBei,ComID) values({0},{1},103,{2})", iH, iU, Employee.Current.ComID)); } //查看门牌的次数 int lookcount = int.Parse(DbHelperSQL.GetSingle(string.Format("select count(1) from h_SeeTelLog where EmployeeID={0} and SheBei in ('101','102') and CONVERT(DATE,exe_date,120)='" + DateTime.Now.ToString("yyyy-MM-dd") + "'", iU)).ToString()); //角色设置的次数 int count = int.Parse(DbHelperSQL.GetSingle(string.Format("select Max(Tabletnumber) as Tabletnumber from p_Role where RoleID in ({0})", Employee.Current.RoleIDs)).ToString()); if (lookcount > count && count != 0) { //alter.StateID = 5; alter.Remarks = DateTime.Now.ToString("yyyy-MM-dd") + "日,查看出售房源门牌号超出角色限制" + count + "次"; alter.exe_Date = DateTime.Now; alter.Update(); Response.Write(1); Response.End(); } else if (lookcount == count && count != 0) { Response.Write(2); } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { myffrmHandlingResults.Items.Clear(); myffrmHandlingResults.Items.Add(new ListItem("全部", "2")); myffrmHandlingResults.Items.Add(new ListItem("未审核", "0")); myffrmHandlingResults.Items.Add(new ListItem("已审核", "1")); if (!GetMySearchControlValue("HandlingResults").IsNullOrWhiteSpace()) { myffrmHandlingResults.SelectedValue = GetMySearchControlValue("HandlingResults"); } else { myffrmHandlingResults.SelectedIndex = 1; } myffrmstate.Items.Clear(); myffrmstate.Items.Add(new ListItem("全部", "2")); myffrmstate.Items.Add(new ListItem("确认", "0")); myffrmstate.Items.Add(new ListItem("投诉", "1")); if (!GetMySearchControlValue("state").IsNullOrWhiteSpace()) { myffrmstate.SelectedValue = GetMySearchControlValue("state"); } else { myffrmstate.SelectedIndex = 2; } } z_bottom = "<li><a class=\"iconL\" href=\"House/FollowComplaintList.aspx?Type=1&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报通过</span></a></li>"; z_bottom += "<li><a class=\"iconL\" href=\"House/FollowComplaintList.aspx?Type=0&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报不通过</span></a></li>"; if (CheckRolePermission("删除")) { z_del = "<li><a class=\"delete\" href=\"House/FollowComplaintList.aspx?doType=del&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要删除吗?\"><span>删除</span></a></li>"; } if (Request.QueryString["doType"] != null) { //投诉通过状态 if (Request.QueryString["doType"].ToString() == "upDateHouse") { if (!string.IsNullOrEmpty(Request["ids"])) { string sql = string.Format("select * from h_ComplaintList where ID in({0})", Request["ids"]); List <h_ComplaintList> list_h_ComplaintList = h_ComplaintList.FindAll(sql); foreach (h_ComplaintList hfa in list_h_ComplaintList) { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hfa.HouseID)); if (Request.QueryString["Type"].ToString() == "1") { //房源跟进中增加修改状态 HouseMIS.EntityUtils.Employee ee = HouseMIS.EntityUtils.Employee.FindByEmployeeID(hfa.Slemployee); //判断房源状态是否本来状态,如果不是的话还原,并且首录入改为举报人 if (hh.StateID != hfa.HouseOldType) { //增加专管员跟进记录 h_FollowUp hsf = new h_FollowUp(); hsf.EmployeeID = hfa.Operator; hsf.HouseID = hfa.HouseID; hsf.FollowUpText = "审核状态:" + h_State.FindByStateID(decimal.Parse(hfa.HouseNewType.ToString())).Name + "→" + h_State.FindByStateID(decimal.Parse(hfa.HouseOldType.ToString())).Name; hsf.Insert(); string uphouse = "update H_houseinfor set StateID=" + hfa.HouseOldType + ",OwnerEmployeeID=" + hfa.Slemployee + ", OrgID=" + ee.OrgID + " where HouseID=" + hfa.HouseID; DbHelperSQL.ExecuteSql(uphouse); } //审核通过扣除征信分数 HouseMIS.EntityUtils.Employee ee1 = HouseMIS.EntityUtils.Employee.FindByEmployeeID(hfa.Operator); EntityUtils.EmpIntegral Empint = new EntityUtils.EmpIntegral(); Empint.EmployeeID = ee1.EmployeeID; Empint.OrgID = ee1.OrgID; Empint.Type = "其他"; Empint.Integral = int.Parse(myffrmzcfs.SelectedValue); Empint.Cause = "投诉审核通过扣除征信分"; Empint.Exe_Date = DateTime.Now; Empint.OperID = 2; Empint.Insert(); hfa.IntegralID = Empint.ID; Common.MsgPush.PushMsg("房源:" + hh.Shi_id + " 的投诉——审核通过!", new string[] { hfa.Slemployee.ToString() }, (int)Common.msgType.房源状态投诉); } else if (Request.QueryString["Type"].ToString() == "0") { Common.MsgPush.PushMsg("房源:" + hh.Shi_id + " 的投诉——审核未通过!", new string[] { hfa.Slemployee.ToString() }, (int)Common.msgType.房源状态投诉); } hfa.HandlingResults = int.Parse(Request.QueryString["Type"]); hfa.HandlingEmp = Current.EmployeeID.ToString().ToInt32(); hfa.HandlingTime = DateTime.Now; hfa.Update(); } } } else if (Request.QueryString["doType"].ToString() == "del") { if (!string.IsNullOrEmpty(Request["ids"])) { DbHelperSQL.ExecuteSql("delete from h_ComplaintList where ID in(" + Request["ids"] + ")"); } } #region 刷新当前页[抓取当页导航数字onclick事件] string JavaScript = " dwzPageBreak({ targetType: \"navTab\", rel: \"\", data: { pageNum: " + Request["selectPage"] + "} });"; JSDo_UserCallBack_Success(JavaScript, "操作成功"); #endregion } }
protected override void OnSaving(object sender, EntityFormEventArgs e) { //非委托中房源无法保存 //if (Entity.houseStateID != 2) //{ // ShowMsg(AlertType.correct, "非委托中房源无法保存!"); // return; //} if (Request.Form["rb1"] != null) { Log log1 = new Log(); log1.Action = "上传开盘录音"; log1.Category = "上传开盘录音"; log1.IP = HttpContext.Current.Request.UserHostAddress; log1.OccurTime = DateTime.Now; log1.UserID = Convert.ToInt32(Employee.Current.EmployeeID); log1.UserName = Employee.Current.Em_name; log1.Remark = string.Format("房源录音ID={0},房源ID={1},房源编号={2}", Request.Form["rb1"], Entity.houseID, H_houseinfor.FindByHouseID(Entity.houseID).Shi_id); log1.Insert(); Entity.phoneID = Request.Form["rb1"].ToInt32(); if (!Entity.employeeID.HasValue) { Entity.employeeID = (int)Current.EmployeeID; } if (!Entity.exe_Date.HasValue) { Entity.exe_Date = DateTime.Now; } } if (Request.Form["txtRemark"] != null) { //审核意见 Entity.Remark = Request.Form["txtRemark"]; //审核日期 Entity.audit_Date = DateTime.Now; //审核人 Entity.employee_auditID = Convert.ToInt32(Current.EmployeeID); //审核状态 Entity.state_ZBCheck = Request.QueryString["StateID"].ToInt32(); string FollowUpText = "总部认证:"; FollowUpText += lblState.Text; FollowUpText += "->" + Enum.GetName(typeof(CheckState), Request.QueryString["StateID"].ToInt32()); if (Request.QueryString["StateID"].ToInt32() == (int)CheckState.合格) { H_houseinfor hh = H_houseinfor.FindByHouseID(Entity.houseID); //房源首录人和申请认证不一致,申请认证人员改为房源首录人 if (Entity.employeeID.HasValue && hh.OwnerEmployeeID != Entity.employeeID.Value) { Employee ee = Employee.FindByEmployeeID(Entity.employeeID.Value); FollowUpText += ",首录人:" + hh.OwnerEmployeeName + "->" + ee.Em_name; } } else if (Request.QueryString["StateID"].ToInt32() == (int)CheckState.虚位以待) { H_houseinfor hh = H_houseinfor.FindByHouseID(Entity.houseID); FollowUpText += ",首录人:" + hh.OwnerEmployeeName + "->无"; } h_FollowUp hf = new h_FollowUp(); hf.HouseID = Entity.houseID; hf.FollowUpText = FollowUpText; hf.EmployeeID = Current.EmployeeID; hf.Insert(); if (Request.QueryString["isefw"] == "1") { DbHelperSQL.ExecuteSql("insert into api_Addhouse(erp_userid, w_userid, houseid, type) values('" + Employee.Current.EmployeeID + "', '', '" + Entity.houseID + "', 'efw')"); } } base.OnSaving(sender, e); }
protected override void OnSaveSuccess(object sender, EntityFormEventArgs e) { if (Request.Form["txtRemark"] != null) { H_houseinfor hh = H_houseinfor.FindByHouseID(Entity.houseID); //总部认证状态 hh.state_ZBCheck = Request.QueryString["StateID"].ToInt32(); //更新日期 hh.Update_date = DateTime.Now; //认证通过 if (Request.QueryString["StateID"].ToInt32() == (int)CheckState.合格) { //当房源首录人和申请认证的人不一致时,修改首录人和门店 if (Entity.employeeID.HasValue && hh.OwnerEmployeeID != Entity.employeeID.Value) { Employee ee = Employee.FindByEmployeeID(Entity.employeeID.Value); hh.OwnerEmployeeID = (int)ee.EmployeeID; hh.OrgID = (int)ee.OrgID; } //hh.Exe_date = Entity.exe_Date.Value; //找出此房源所有未审核,未上传开盘录音的记录,将其清空 List <h_houseinfor_ZBCheck> listZB = h_houseinfor_ZBCheck.FindAll(string.Format(@"select * from h_houseinfor_ZBCheck where houseid={0} and phoneID is null and employee_auditID is null and isDel=0" , Entity.houseID)); if (listZB.Count > 0) { DbHelperSQL.ExecuteSql("update h_houseinfor_ZBCheck set isdel=1 where id in(" + string.Join(",", listZB.Select(x => x.ID).ToArray()) + ")"); } if (Entity.phoneID.HasValue) { h_RecordClose hrc = h_RecordClose.Find(h_RecordClose._.phoneID, Entity.phoneID.Value); if (hrc != null) { hrc.IsCheck = true; hrc.Update(); } else { hrc = new h_RecordClose(); i_InternetPhone iip = i_InternetPhone.FindByKey(Entity.phoneID.Value); hrc.EmployeeID = iip.employeeID; hrc.phoneID = Entity.phoneID.Value; hrc.aType = 0; hrc.CheckEmployeeID = iip.employeeID; hrc.IsCheck = true; hrc.CheckDate = DateTime.Now; hrc.exe_date = DateTime.Now; hrc.ComID = Current.ComID; hrc.Insert(); } } //增加排序积分 s_SysParam ss = s_SysParam.FindByParamCode("houseKP"); //获取分隔符的值,第一个为分值,第二是否有 有效期,第三为有效期值 string[] ssValue = ss.Value.Split('|'); e_Integral ei = new e_Integral(); ei.employeeID = Entity.employeeID.Value; ei.Type = (int)integral_Type.房源与经纪人; ei.tableName = "h_houseinfor"; ei.coloumnName = "HouseID"; ei.keyID = Entity.houseID; ei.integralParam = "houseKP"; ei.integralValue = ssValue[0].ToInt32(); ei.integralDay = ssValue[1] == "1" ? ssValue[2].ToInt32() : 0; ei.exe_Date = DateTime.Now; ei.Insert(); } //认证驳回 else if (Request.QueryString["StateID"].ToInt32() == (int)CheckState.驳回) { h_houseinfor_ZBCheck hhz = new h_houseinfor_ZBCheck(); hhz.houseID = Entity.houseID; hhz.employeeID = Entity.employeeID; hhz.exe_Date = DateTime.Now; hhz.state_ZBCheck = (int)CheckState.待认证; hhz.rejectNum = Entity.rejectNum.Value + 1; hhz.comID = Current.ComID; hhz.Insert(); } //认证 虚位以待 else if (Request.QueryString["StateID"].ToInt32() == (int)CheckState.虚位以待) { hh.OwnerEmployeeID = 0; hh.OrgID = 0; //修改为无效状态 hh.StateID = 10; hh.CurrentEmployee = Current.EmployeeID; //找出此房源所有未审核,未上传开盘录音的记录,将其清空 List <h_houseinfor_ZBCheck> listZB = h_houseinfor_ZBCheck.FindAll(string.Format(@"select * from h_houseinfor_ZBCheck where houseid={0} and phoneID is null and employee_auditID is null and isDel=0" , Entity.houseID)); if (listZB.Count > 0) { DbHelperSQL.ExecuteSql("update h_houseinfor_ZBCheck set isdel=1 where id in(" + string.Join(",", listZB.Select(x => x.ID).ToArray()) + ")"); } } hh.Update(); } ShowMsg(AlertType.correct, "保存成功"); //base.OnSaveSuccess(sender, e); }