Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["type"] != null)
            {
                H_houseinfor hh = H_houseinfor.Find("shi_id='" + Request.Form["Shi_id"] + "' and " + GetRolePermissionOrgIds("查看", "OrgID"));
                if (hh != null)
                {
                    hh.Shi_id = Request.Form["NewShi_id"];
                    if (H_houseinfor.FindCount("Shi_id", hh.Shi_id) == 0)
                    {
                        hh.Update();
                        //插入日志
                        Log log = new Log();
                        log.Action    = "修改";
                        log.Category  = "房源编号修改";
                        log.IP        = HttpContext.Current.Request.UserHostAddress;
                        log.OccurTime = DateTime.Now;
                        log.UserID    = Convert.ToInt32(HouseMIS.EntityUtils.Employee.Current.EmployeeID);
                        log.UserName  = HouseMIS.EntityUtils.Employee.Current.Em_name;
                        log.Remark    = "原房源编号=" + Request.Form["Shi_id"] + ",新房源编号=" + Request.Form["NewShi_id"];
                        log.Insert();

                        JSDo_UserCallBack_Success("", "操作成功!");
                    }
                    else
                    {
                        JSDo_UserCallBack_Error("", "操作失败!");
                    }
                }
                else
                {
                    JSDo_UserCallBack_Error("", "您没有操作该房源的权限!");
                }
            }
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            form1.Action += "?HouseID=" + HouseID;
            if (!IsPostBack)
            {
                string seeRecord      = GetRolePermissionEmployeeIds("查看录音", "EmployeeID");
                string seeRecord_Mask = GetRolePermissionEmployeeIds("查看屏蔽录音", "EmployeeID");

                string sql = string.Format(@"select b.recordUrl as a,
                                                    d.Name+'('+c.em_id+'-'+c.em_name+')'+'  '+CONVERT(varchar,createTime,120) as c,
                                                    b.phoneID,b.employeeID,source
                                                    from i_InternetPhone b
                                                    inner join e_Employee c on b.employeeID=c.EmployeeID
                                                    inner join s_Organise d on d.OrgID=c.OrgID 
                                                    where b.HouseId={0}
                                                    and b.recordUrlDel=1 
                                                    and b.RecrodType=1 
                                                    and b.talktime>0
                                                    and b.EmployeeID in(select EmployeeID  
                                                                        from e_Employee 
                                                                        where {1})
                                                    and b.phoneID not in (select a.phoneID 
                                                                            from i_InternetPhone a
                                                                            inner join h_RecordClose b on a.phoneID = b.phoneID
                                                                            where a.houseID ={0}
                                                                            and b.IsCheck = 1  
                                                                            and a.EmployeeID not in (select EmployeeID 
                                                                                                        from e_Employee
                                                                                                        where {2}))
                                                    order by b.phoneID desc",
                                           Request.QueryString["HouseID"],
                                           seeRecord,
                                           seeRecord_Mask);

                //string sql = string.Format(@"select A.recordUrl as a,C.Name+'('+B.em_id+'-'+B.em_name+')'+'  '+CONVERT(varchar,createTime,120) as c,A.phoneID,A.employeeID,source
                //                                                from i_InternetPhone A
                //                                                left join e_Employee B on A.employeeID=B.EmployeeID
                //                                                left join s_Organise C on B.OrgID=C.OrgID
                //                                                where houseID={0}
                //                                                and A.recordUrlDel=1
                //                                                order by a.createTime desc",
                //                                                Request.QueryString["HouseID"]);
                DataSet dts = DbHelperSQL.Query(sql);

                if (dts.Tables[0].Rows.Count > 0)
                {
                    sql = string.Format(@"select phoneID,EmployeeID from h_RecordClose where IsCheck=1 and phoneID in({0})",
                                        string.Join(",", dts.Tables[0].AsEnumerable().Select(x => x.Field <decimal>("phoneID"))));

                    list_h_RecordClose = h_RecordClose.FindAll(sql);
                }

                hf_ly2.DataSource = dts.Tables[0];
                hf_ly2.DataBind();

                frmOldPrice.Text = H_houseinfor.Find("HouseID", HouseID).Min_price.ToString();
            }
        }
Example #5
0
        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;
            }
        }
Example #6
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     if (context.Request["HouseDicID"] != null)
     {
         context.Response.Write(H_houseinfor.GetHouseDicInfo(Convert.ToDecimal(context.Request.QueryString["HouseDicID"])));
     }
     if (context.Request["HouseID"] != null)
     {
         context.Response.Write(GetHTML(context.Request["HouseID"].ToString()));
     }
 }
Example #7
0
        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 + "的房屋,想和你确认什么时间方便看房";
            }
        }
Example #8
0
 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");
         }
     }
 }
Example #9
0
        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事件]
            }
        }
Example #10
0
        /// <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;
                }
            }
        }
Example #11
0
        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
            }
        }
Example #12
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);
                        }
                    }
                }
            }
        }
Example #13
0
        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
            }
        }
Example #14
0
        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);
        }
Example #15
0
        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);
        }
Example #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //if (CHardInfo != null)
                //    H_houseinfor.Meta.Query("insert into ERP_Log([Value],[Key],EmployeeID,IP,DianNao,Pages) values(" + House.HouseID + ",'HouseTelList'," + Employee.Current.EmployeeID + ",'" + TFrameWork.Web.WebHelper.UserHost + "','" + CHardInfo.Macs + "','HouseTelForm')");
                //else
                //    H_houseinfor.Meta.Query("insert into ERP_Log([Value],[Key],EmployeeID,IP,Pages) values(" + House.HouseID + ",'HouseTelList'," + Employee.Current.EmployeeID + ",'" + TFrameWork.Web.WebHelper.UserHost + "','HouseTelForm')");
                this.HTFpagerForm.ID += House.HouseID;

                #region 1.显示 [查看电话] 按钮

                if (!IsShowTel) //如果不显示电话
                {
                    //判断调电权限
                    if (H_houseinfor.NeedTelPower(Convert.ToDecimal(Request["HouseID"]), Convert.ToInt32(Employee.Current.EmployeeID)))
                    {
                        LokTelButa.Visible = IsCanShowTel;
                    }
                    if (LokTelButa.Visible == true)
                    {
                        LokTelButa.Attributes.Add("onclick", "return LookTelClick('" + House.HouseID + "')");
                    }
                }
                else
                {
                    //当日查看电话次数
                    int seeTelNum = Convert.ToInt32(EntityUtils.DBUtility.DbHelperSQL.GetSingle(string.Format(@"SELECT Count(1)
                                                                                                                FROM   h_seetellog
                                                                                                                WHERE  employeeid = {0}
                                                                                                                       AND exe_date >= '{1}'
                                                                                                                       AND exe_date <= '{1} 23:59:59'
                                                                                                                       AND shebei = 1 ",
                                                                                                              Current.EmployeeID,
                                                                                                              DateTime.Now.ToString("yyyy-MM-dd"))));
                    //角色最大查看电话次数
                    int seeTelNumMax = Current.Roles.Select(x => x.Telnumber.Value).Max();
                    if (seeTelNum > seeTelNumMax)
                    {
                        AlertMsg_Warn("已超过当日次数,无法查看,查看次数:" + seeTelNum + "/" + seeTelNumMax);

                        IsShowTel = false;
                    }
                    else
                    {
                        LokTelButa.Visible = false;

                        #region 插入调电记录

                        h_SeeTelLog hs = new h_SeeTelLog();
                        hs.EmployeeID = Employee.Current.EmployeeID;
                        hs.HouseID    = Convert.ToDecimal(HouseID.Value);
                        hs.IsPower    = H_houseinfor.NeedTelPower(House.HouseID, Employee.Current.EmployeeID.ToString().ToInt32());
                        hs.Insert();

                        #endregion 插入调电记录

                        AlertMsg_Success("查看次数:" + seeTelNum + "/" + seeTelNumMax);
                    }

                    //显示室号
                    room.Value = House.Build_room;
                }
                cbTel.DataSource     = i_InternetTel.FindAll(new string[] { "EmployeeID", "IsDel" }, new string[] { Employee.Current.EmployeeID.ToString(), "0" });
                cbTel.DataTextField  = "MyTel";
                cbTel.DataValueField = "MyTel";
                cbTel.DataBind();
                #endregion 1.显示 [查看电话] 按钮
            }

            if (Request.Form["LSH"] != null && Request.Form["LSH"] != "")
            {
                #region 编辑电话

                h_HouseTelList hh = h_HouseTelList.Find("LSH", Request.Form["LSH"]);
                hh.EmployeeID = Employee.Current.EmployeeID;
                if (Request.Form["HouseID"] != "0")
                {
                    hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]);
                }
                else
                {
                    hh.HouseID = 0;
                    hh.GU_ID   = Request.Form["GU_ID"].ToString();
                }
                hh.landlord_name = Request.Form["frmName"].ToString();
                hh.Tel1          = H_houseinfor.TelDispose(Request.Form["Tel"]);
                string oldTel = hh.Tel2;
                hh.Tel2    = Request.Form["Tel"].TelEncrypt();
                hh.TelType = Request.Form["TelType"].ToString();
                hh.Update();

                #region 插入跟进

                h_FollowUp hfo = new h_FollowUp();
                hfo.HouseID      = hh.HouseID;
                hfo.EmployeeID   = Employee.Current.EmployeeID;
                hfo.FollowUpText = "电话修改";
                hfo.Insert();

                #endregion 插入跟进

                #region 电话修改记录

                TelChange tc = new TelChange();
                tc.AddEmployeeID = Employee.Current.EmployeeID;
                tc.HouseID       = hh.HouseID;
                tc.NewTel        = Request.Form["Tel"];
                tc.OldTel        = oldTel.TelDecrypt((Int32)hh.HouseID, 0);
                tc.Insert();
                LSH.Value = "";

                #endregion 电话修改记录

                #endregion 编辑电话
            }
            else if (Request.Form["frmName"] != null && Request.Form["frmName"] != "")
            {
                #region 添加电话

                h_HouseTelList hh = new h_HouseTelList();
                hh.EmployeeID = Employee.Current.EmployeeID;
                if (Request.Form["HouseID"] != "0")
                {
                    hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]);
                }
                else
                {
                    hh.HouseID = 0;
                    hh.GU_ID   = Request.Form["GU_ID"].ToString();
                }
                hh.landlord_name = Request.Form["frmName"].ToString();
                hh.Tel1          = H_houseinfor.TelDispose(Request.Form["Tel"]);
                hh.Tel2          = Request.Form["Tel"].TelEncrypt();
                hh.TelType       = Request.Form["TelType"].ToString();
                hh.Insert();
                if (hh.HouseID > 0)
                {
                    h_FollowUp hfo = new h_FollowUp();
                    hfo.HouseID      = hh.HouseID;
                    hfo.EmployeeID   = Employee.Current.EmployeeID;
                    hfo.FollowUpText = "添加新电话,编号:" + hh.LSH;
                    hfo.Insert();
                }

                #endregion 添加电话

                Response.Write("<script>alertMsg.correct(\"操作成功请点调电拨打电话!\");</script>");
            }
            if (!CheckRolePermission("不隐号"))
            {
                if (!CheckRolePermission("添加电话", Convert.ToDecimal(House.OwnerEmployeeID)))
                {
                    hTelAdd.Visible = false;
                }
            }
            else
            {
                if (CheckRolePermission("不隐号"))
                {
                    h_SeeTelLog hs = new h_SeeTelLog();
                    hs.EmployeeID = Employee.Current.EmployeeID;
                    hs.HouseID    = Convert.ToDecimal(HouseID.Value);
                    hs.IsPower    = false;
                    hs.Insert();
                }
                //OldTel = "原始号码:" + House.Landlord_tel2.TelDecrypt((Int32)hs.HouseID, TelDecPoint.PC_HouseForm_TelPhone) + "</span>";
            }
        }
Example #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.HTFpagerForm.ID += House.HouseID;

                #region 1.显示 [查看电话] 按钮

                if (!IsShowTel) //如果不显示电话
                {
                    //判断调电权限
                    //if (H_houseinfor.NeedTelPower(Convert.ToDecimal(Request["HouseID"]), Convert.ToInt32(Employee.Current.EmployeeID)))
                    //{
                    //    LokTelButa.Visible = IsCanShowTel;
                    //}
                    //if (LokTelButa.Visible == true)
                    //{
                    //    LokTelButa.Attributes.Add("onclick", "return LookTelClick('" + House.HouseID + "')");
                    //}
                }
                else
                {
                    //LokTelButa.Visible = false;

                    #region 插入调电记录

                    if (CheckRolePermission("不隐号") || IsCanShowTel)
                    {
                        h_SeeTelLog hs = new h_SeeTelLog();
                        hs.EmployeeID = Employee.Current.EmployeeID;
                        hs.HouseID    = Convert.ToDecimal(HouseID.Value);
                        hs.IsPower    = H_houseinfor.NeedTelPower(House.HouseID, Employee.Current.EmployeeID.ToString().ToInt32());
                        hs.Insert();
                    }

                    #endregion 插入调电记录

                    //显示室号
                    room.Value = House.Build_room;
                }
                cbTel.DataSource     = i_InternetTel.FindAll(new string[] { "EmployeeID", "IsDel" }, new string[] { Employee.Current.EmployeeID.ToString(), "0" });
                cbTel.DataTextField  = "MyTel";
                cbTel.DataValueField = "MyTel";
                cbTel.DataBind();
                #endregion 1.显示 [查看电话] 按钮
            }

            if (Request.Form["LSH"] != null && Request.Form["LSH"] != "")
            {
                #region 编辑电话

                h_HouseTelList hh = h_HouseTelList.Find("LSH", Request.Form["LSH"]);
                hh.EmployeeID = Employee.Current.EmployeeID;
                if (Request.Form["HouseID"] != "0")
                {
                    hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]);
                }
                else
                {
                    hh.HouseID = 0;
                    hh.GU_ID   = Request.Form["GU_ID"].ToString();
                }
                hh.landlord_name = Request.Form["frmName"].ToString();
                hh.Tel1          = H_houseinfor.TelDispose(Request.Form["Tel"]);
                string oldTel = hh.Tel2;
                hh.Tel2    = Request.Form["Tel"].TelEncrypt();
                hh.TelType = Request.Form["TelType"].ToString();
                hh.Update();

                #region 插入跟进

                h_FollowUp hfo = new h_FollowUp();
                hfo.HouseID      = hh.HouseID;
                hfo.EmployeeID   = Employee.Current.EmployeeID;
                hfo.FollowUpText = "电话修改";
                hfo.Insert();

                #endregion 插入跟进

                #region 电话修改记录

                TelChange tc = new TelChange();
                tc.AddEmployeeID = Employee.Current.EmployeeID;
                tc.HouseID       = hh.HouseID;
                tc.NewTel        = Request.Form["Tel"];
                tc.OldTel        = oldTel.TelDecrypt((Int32)hh.HouseID, 0);
                tc.Insert();
                LSH.Value = "";

                #endregion 电话修改记录

                #endregion 编辑电话
            }
            else if (Request.Form["frmName"] != null && Request.Form["frmName"] != "")
            {
                #region 添加电话

                h_HouseTelList hh = new h_HouseTelList();
                hh.EmployeeID = Employee.Current.EmployeeID;
                if (Request.Form["HouseID"] != "0")
                {
                    hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]);
                }
                else
                {
                    hh.HouseID = 0;
                    hh.GU_ID   = Request.Form["GU_ID"].ToString();
                }
                hh.landlord_name = Request.Form["frmName"].ToString();
                hh.Tel1          = H_houseinfor.TelDispose(Request.Form["Tel"]);
                hh.Tel2          = Request.Form["Tel"].TelEncrypt();
                hh.TelType       = Request.Form["TelType"].ToString();
                hh.Insert();
                if (hh.HouseID > 0)
                {
                    h_FollowUp hfo = new h_FollowUp();
                    hfo.HouseID      = hh.HouseID;
                    hfo.EmployeeID   = Employee.Current.EmployeeID;
                    hfo.FollowUpText = "添加新电话,编号:" + hh.LSH;
                    hfo.Insert();
                }

                #endregion 添加电话

                Response.Write("<script>alertMsg.correct(\"操作成功请点调电拨打电话!\");</script>");
            }
            if (!CheckRolePermission("不隐号"))
            {
                //if (!CheckRolePermission("添加电话", Convert.ToDecimal(House.OwnerEmployeeID)))
                //hTelAdd.Visible = false;
            }
            else
            {
                if (CheckRolePermission("不隐号"))
                {
                    h_SeeTelLog hs = new h_SeeTelLog();
                    hs.EmployeeID = Employee.Current.EmployeeID;
                    hs.HouseID    = Convert.ToDecimal(HouseID.Value);
                    hs.IsPower    = false;
                    hs.Insert();
                }
            }
        }
Example #18
0
        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");
                }
            }
        }
Example #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                myffrmwc.Items.Clear();
                myffrmwc.Items.Add(new ListItem("全部", "2"));
                myffrmwc.Items.Add(new ListItem("未完成", "0"));
                myffrmwc.Items.Add(new ListItem("已完成", "1"));

                string temp = GetMySearchControlValue("wc");
                if (!temp.IsNullOrWhiteSpace())
                {
                    myffrmwc.SelectedValue = temp;
                }
                else
                {
                    myffrmwc.SelectedIndex = 1;
                }

                myffrmlq.Items.Clear();
                myffrmlq.Items.Add(new ListItem("全部", ""));
                myffrmlq.Items.Add(new ListItem("未领取", "0"));
                myffrmlq.Items.Add(new ListItem("已领取", "1"));

                myffrmsh.Items.Clear();
                myffrmsh.Items.Add(new ListItem("全部", ""));
                myffrmsh.Items.Add(new ListItem("未审核", "0"));
                myffrmsh.Items.Add(new ListItem("已审核", "1"));

                FullDropListData(typeof(h_EntrustType), this.myffrmEntrustTypeID, "Name", "EntrustTypeID", "");
            }

            if (CheckRolePermission("修改"))
            {
                z_bottom  = "<li><a class=\"iconL\" href=\"House/HousePicListYY.aspx?Type=0&doType=lq&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>领取</span></a></li>";
                z_bottom += "<li><a class=\"iconL\" href=\"House/HousePicListYY.aspx?Type=0&doType=qxlq&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>取消领取</span></a></li>";
                z_bottom += "<li><a class=\"iconL\" href=\"House/HousePicListYY.aspx?Type=0&doType=wc&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>完成</span></a></li>";
                z_bottom += "<li><a class=\"delete\" href=\"House/HousePicListYY.aspx?doType=del&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要删除吗?\"><span>删除照片</span></a></li>";
                z_bottom += "<li><a class=\"edit\" href=\"House/HouseRemarkAdd.aspx?NavTabId=" + NavTabId + "&doAjax=true&ID={ID}\" rel='Bargain1' width=\"360\" height=\"230\" target=\"dialog\" mask=\"true\"><span>增加备注</span></a></li>";
            }
            if (CheckRolePermission("删除"))
            {
                z_bottom += "<li><a class=\"iconL\" href=\"House/HousePicListYY.aspx?doType=sh&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true\" rel=\"ids\" target=\"selectedTodo\"><span>审核</span></a></li>";
            }
            if (CheckRolePermission("驳回"))
            {
                z_bottom += "<li><a class=\"iconL\" href=\"House/HousePicListYY.aspx?doType=bh&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要驳回吗?\"><span>驳回</span></a></li>";
            }

            #region 执行操作
            if (Request.QueryString["doType"] != null)
            {
                //领取
                if (Request.QueryString["doType"].ToString() == "lq")
                {
                    if (!string.IsNullOrEmpty(Request["ids"]))
                    {
                        string sql = string.Format("select * from h_PicList_YY where ID in({0})", Request["ids"]);
                        List <h_PicList_YY> list_h_PicList_YY = h_PicList_YY.FindAll(sql);
                        foreach (h_PicList_YY hfa in list_h_PicList_YY)
                        {
                            //摄影师以提示已经领取任务
                            if (hfa.Photographer != null)
                            {
                                Response.Write("<script>alertMsg.error(\"任务已被领取,不可在领!\")</script>");
                                Response.End();
                            }
                            else
                            {
                                hfa.Photographer = int.Parse(Current.EmployeeID.ToString());
                                hfa.PotoOrg      = int.Parse(Current.OrgID.ToString());
                                hfa.Update();
                            }
                        }
                    }
                }
                //取消领取
                else if (Request.QueryString["doType"].ToString() == "qxlq")
                {
                    if (!string.IsNullOrEmpty(Request["ids"]))
                    {
                        string sql = string.Format("select * from h_PicList_YY where ID in({0})", Request["ids"]);
                        List <h_PicList_YY> list_h_PicList_YY = h_PicList_YY.FindAll(sql);
                        foreach (h_PicList_YY hfa in list_h_PicList_YY)
                        {
                            hfa.Photographer = null;
                            hfa.PotoOrg      = null;
                            hfa.Update();
                        }
                    }
                }
                //完成
                else if (Request.QueryString["doType"].ToString() == "wc")
                {
                    if (!string.IsNullOrEmpty(Request["ids"]))
                    {
                        string sql = string.Format("select * from h_PicList_YY where ID in({0})", Request["ids"]);
                        List <h_PicList_YY> list_h_PicList_YY = h_PicList_YY.FindAll(sql);
                        foreach (h_PicList_YY hfa in list_h_PicList_YY)
                        {
                            //完成时间更新
                            hfa.Finishtime = DateTime.Now;
                            hfa.Update();
                        }
                    }
                }
                else if (Request.QueryString["doType"].ToString() == "del")
                {
                    if (!string.IsNullOrEmpty(Request["ids"]))
                    {
                        string sql = string.Format("select * from h_PicList_YY where ID in({0})", Request["ids"]);
                        List <h_PicList_YY> list_h_PicList_YY = h_PicList_YY.FindAll(sql);
                        h_PicList           hp;
                        string HouseID;

                        foreach (h_PicList_YY hfa in list_h_PicList_YY)
                        {
                            HouseID = hfa.HouseID.ToString();
                            //删除全部照片
                            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 PicTypeID!=9 and HouseID= " + HouseID);

                            H_houseinfor.Update("HasImage=0", "HouseID=" + HouseID);

                            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();
                        }

                        StringBuilder sb1 = new StringBuilder();
                        sb1.Append("<script>alertMsg.correct(\"操作成功!\")</script>");
                        Response.Write(sb1.ToString());
                        Response.End();
                    }
                }
                //驳回
                else if (Request.QueryString["doType"].ToString() == "bh")
                {
                    if (!string.IsNullOrEmpty(Request["ids"]))
                    {
                        string sql = string.Format("select * from h_PicList_YY where ID in({0})", Request["ids"]);
                        List <h_PicList_YY> list_h_PicList_YY = h_PicList_YY.FindAll(sql);
                        foreach (h_PicList_YY hfa in list_h_PicList_YY)
                        {
                            hfa.Delete();
                        }
                    }
                }
                //审核
                else if (Request.QueryString["doType"].ToString() == "sh")
                {
                    if (!string.IsNullOrEmpty(Request["ids"]))
                    {
                        string sql = string.Format("select * from h_PicList_YY where ID in({0})", Request["ids"]);
                        List <h_PicList_YY> list_h_PicList_YY = h_PicList_YY.FindAll(sql);
                        foreach (h_PicList_YY hfa in list_h_PicList_YY)
                        {
                            if (hfa.IsCheck == 1)
                            {
                                hfa.IsCheck = 0;
                            }
                            else
                            {
                                hfa.IsCheck = 1;
                            }
                            hfa.Update();
                        }
                    }
                }

                #region 刷新当前页[抓取当页导航数字onclick事件]

                string JavaScript = " dwzPageBreak({ targetType: \"navTab\", rel: \"\", data: { pageNum: " + Request["selectPage"] + "} });";
                JSDo_UserCallBack_Success(JavaScript, "操作成功");

                #endregion 刷新当前页[抓取当页导航数字onclick事件]
            }
            #endregion
        }
Example #20
0
        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");
                        //}
                    }
                }
            }
        }