コード例 #1
0
        /// <summary>
        /// 获取合同信息
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public AdminJsonStr selectcontractinfo(HttpContext content)
        {
            bankDBAccess bank       = new bankDBAccess();
            string       contractid = content.Request["contactid"];
            contractinfo cont       = new contractinfo();
            DataRow      drbank     = bank.selectcontractinfo(contractid);

            if (drbank != null)
            {
                cont.Contratctnum       = drbank["F_8057_03"].ToString();                                                                             //合同编号
                cont.Buyname            = drbank["F_8057_13"].ToString();                                                                             //买方姓名
                cont.Sellname           = drbank["F_8057_44"].ToString();                                                                             //卖方姓名
                cont.Agent              = drbank["F_8057_60"].ToString();                                                                             //经纪人
                cont.Loadname           = drbank["F_8057_86"].ToString();                                                                             //信贷专员
                cont.Area               = drbank["F_8057_40"].ToString();                                                                             //面积
                cont.Address            = drbank["F_8057_36"].ToString();                                                                             //物业地址
                cont.Contractcountmoney = drbank["F_8057_09"].ToString();                                                                             //合同总价
                cont.Frfistmoney        = drbank["F_8057_10"].ToString() == "" ? "0" : ((decimal)drbank["F_8057_10"] / 10000).ToString();             //首付金额
                cont.Loadmoney          = drbank["F_8057_11"].ToString();                                                                             //商业贷款金额
                cont.GJJLoadmoney       = drbank["F_8057_84"].ToString();                                                                             //公积金贷款金额
                cont.Bankname           = drbank["F_8057_74"].ToString();                                                                             //银行
                cont.AcceptTime         = drbank["F_8057_85"].ToString() == "" ? "" : Convert.ToDateTime(drbank["F_8057_85"]).ToString("yyyy-MM-dd"); //接受时间
                cont.MortgageTime       = drbank["F_8057_95"].ToString() == "" ? "" : Convert.ToDateTime(drbank["F_8057_95"]).ToString("yyyy-MM-dd"); //按揭办理时间
                cont.ColletData         = drbank["F_8057_96"].ToString() == "" ? "" : Convert.ToDateTime(drbank["F_8057_96"]).ToString("yyyy-MM-dd"); //资料已齐时间
                cont.DataPaass          = drbank["F_8057_97"].ToString() == "" ? "" : Convert.ToDateTime(drbank["F_8057_97"]).ToString("yyyy-MM-dd"); //审批通过时间
                cont.ContractTurn       = drbank["F_8057_98"].ToString() == "" ? "" : Convert.ToDateTime(drbank["F_8057_98"]).ToString("yyyy-MM-dd"); //合同移交时间
                cont.BounceTime         = drbank["F_8057_99"].ToString() == "" ? "" : Convert.ToDateTime(drbank["F_8057_99"]).ToString("yyyy-MM-dd"); //退件时间
                model.data              = cont;
            }
            return(model);
        }
コード例 #2
0
        public AdminJsonStr updatePwd(HttpContext content)
        {
            AdminJsonStr model       = new AdminJsonStr();
            bankDBAccess bank        = new bankDBAccess();
            string       subbranchID = content.Request["subbranchID"].ToString().Split('|')[0];
            string       oldpwd      = content.Request["oldpwd"].ToString();
            string       newpwd      = content.Request["newpwd"].ToString();

            try
            {
                string msg = bank.updatePwd(subbranchID, newpwd, oldpwd);
                if (!string.IsNullOrEmpty(msg))
                {
                    model.code = 1;
                    model.msg  = msg;
                    return(model);
                }
            }
            catch (Exception ex)
            {
                model.code = 1;
                model.msg  = ex.Message;
                return(model);
            }
            return(model);
        }
コード例 #3
0
        public AdminJsonStr getbankList()
        {
            AdminJsonStr        model       = new AdminJsonStr();
            List <keyValuePair> list_payway = new bankDBAccess().getbanklist();

            model.data  = list_payway;
            model.count = list_payway.Count;
            return(model);
        }
コード例 #4
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="bankcodeid">按揭资料ID</param>
        /// <returns></returns>
        public AdminJsonStr selectbankcode(HttpContext content)
        {
            bankDBAccess     bank       = new bankDBAccess();
            string           bankcodeid = content.Request["bankcodeid"];
            DataRow          dr         = bank.selectbankcode(bankcodeid);
            ArrangementsInfo arrangem   = new ArrangementsInfo();

            if (dr != null)
            {
                arrangem.Buycode  = dr["F_8100_03"].ToString(); //买
                arrangem.Sellcode = dr["F_8100_04"].ToString(); //卖
                model.data        = arrangem;
            }
            return(model);
        }
コード例 #5
0
        /// <summary> 获取资料是否齐全
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public AdminJsonStr getDataFull(HttpContext content)
        {
            string       cid  = content.Request["cid"];
            bankDBAccess bank = new bankDBAccess();
            string       id   = bank.getDataFull(cid);

            if (string.IsNullOrEmpty(id))
            {
                model.code = 1;
                model.msg  = "无该合同详情!";
                return(model);
            }
            model.dataPlanID      = id;
            model.dataPlanContent = ((emContractSpan)int.Parse(id)).ToString();
            return(model);
        }
コード例 #6
0
        /// <summary>银行按揭信息详情收到/缺失按揭资料查询
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="isReceive">true 已收到; false  缺失</param>
        /// <returns></returns>
        public AdminJsonStr getReceiveDataList(HttpContext content, bool isReceive)
        {
            //表格分页数据
            AdminJsonStr model = new AdminJsonStr();
            bankDBAccess bank  = new bankDBAccess();

            pageIndex = string.IsNullOrEmpty(content.Request["page"]) //页数
                       ? 1
                       : int.Parse(content.Request["page"].ToString());
            pageSize = string.IsNullOrEmpty(content.Request["limit"]) //页大小
                ? 2
                : int.Parse(content.Request["limit"].ToString());
            cid = string.IsNullOrEmpty(content.Request["cid"])
                ? ""
                : content.Request["cid"].ToString();
            if (string.IsNullOrEmpty(cid))
            {
                model.code = 1;
                model.msg  = "无该合同的按揭信息!";
                return(model);
            }
            int tableTotalCount          = 0;
            List <receiveData> list_Data = bank.GetReceiveDataList(cid, isReceive, pageIndex, pageSize, ref tableTotalCount);

            model.data  = list_Data;
            model.count = tableTotalCount;
            if (isReceive)
            {
                //获取拼接数据
                string ReceiveBuyHaveDatas    = "";
                string ReceiveSellHaveDatas   = "";
                string ReceiveBuyNoHaveDatas  = "";
                string ReceiveSellNoHaveDatas = "";
                bank.getFullData(cid, ref ReceiveBuyHaveDatas, ref ReceiveSellHaveDatas, ref ReceiveBuyNoHaveDatas,
                                 ref ReceiveSellNoHaveDatas);
                model.ReceiveBuyHaveDatas    = ReceiveBuyHaveDatas;
                model.ReceiveSellHaveDatas   = ReceiveSellHaveDatas;
                model.ReceiveBuyNoHaveDatas  = ReceiveBuyNoHaveDatas;
                model.ReceiveSellNoHaveDatas = ReceiveSellNoHaveDatas;
            }
            return(model);
        }
コード例 #7
0
        /// <summary>
        /// 加入按揭资料数据
        /// </summary>
        /// <param name="buycount">买方资料</param>
        /// <param name="sellcount">卖方资料</param>
        /// <param name="contrsctid">合同ID</param>
        /// <param name="codetype">收到/缺失</param>
        /// <param name="buytext">买方其他资料</param>
        /// <param name="selltext">卖方其他资料</param>
        /// <returns></returns>
        public AdminJsonStr insertinformation(HttpContext content)
        {
            AdminJsonStr model      = new AdminJsonStr();
            string       buycount   = content.Request["buycount"];   //买方资料
            string       sellcount  = content.Request["sellcount"];  //卖方资料
            string       contrsctid = content.Request["contractid"]; //合同ID
            string       buytext    = content.Request["buytext"];    //买方其他资料
            string       selltext   = content.Request["selltext"];   //卖方其他资料
            string       bankdataid = content.Request["bankcodeid"]; //按揭资料id
            string       codetype   = content.Request["typecode"];   //缺失/收到

            if (buycount == "" && sellcount == "" && buytext == "" && selltext == "")
            {
                model.code = 1;
            }
            else
            {
                bankDBAccess bank = new bankDBAccess();
                //buycount = buycount.Trim(',');
                //sellcount = sellcount.Trim(',');
                if (buytext != "")
                {
                    buytext   = buytext.Replace(",", ",");
                    buycount += "买方其他资料:" + buytext;
                }
                if (selltext != "")
                {
                    selltext   = selltext.Replace(",", ",");
                    sellcount += "卖方其他资料:" + selltext;
                }
                if (bankdataid != "")//修改
                {
                    bank.updatecode(bankdataid, buycount, sellcount);
                }
                else
                {
                    bank.insertcode(buycount, sellcount, contrsctid, codetype);
                }
            }
            return(model);
        }
コード例 #8
0
        /// <summary> 修改合同进度
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public AdminJsonStr updatePlan(HttpContext content)
        {
            string       cid      = content.Request["cid"];
            string       plan     = content.Request["plan"];
            string       username = content.Request["username"];
            bankDBAccess bank     = new bankDBAccess();
            string       msg      = bank.updatePlan(cid, plan, username);

            if (plan == emContractSpan.资料收齐.GetHashCode().ToString() || plan == emContractSpan.审批通过.GetHashCode().ToString())
            {
                msg = bank.updateFlow(cid, plan);
            }
            if (!string.IsNullOrEmpty(msg))
            {
                model.code = 1;
                model.msg  = msg;
            }


            return(model);
        }
コード例 #9
0
        /// <summary> 插入按揭资料
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public AdminJsonStr insertbankcode(HttpContext content)
        {
            string       contactid  = content.Request["contact"];
            string       inbuycode  = content.Request["inbuycode"];
            string       insellcode = content.Request["insellcode"];
            string       upbuycode  = content.Request["upbuycode"];
            string       upsellcode = content.Request["upsellcode"];
            bankDBAccess bank       = new bankDBAccess();

            //查询数据是否存在
            //DataRow dr_code = bank.selbankcode(contactid);
            //if (dr_code != null)
            //{
            bank.updatebankdata(contactid, inbuycode, insellcode, upbuycode, upsellcode);
            //}
            //else
            //{
            //   bank.insertbankcode(contactid, inbuycode, insellcode, upbuycode, upsellcode);
            //   model.msg = "";
            //}

            return(model);
        }
コード例 #10
0
        /// <summary> 删除数据
        /// </summary>
        /// <returns></returns>
        public AdminJsonStr delReceiveDataList(HttpContext content)
        {
            AdminJsonStr model     = new AdminJsonStr();
            bankDBAccess bank      = new bankDBAccess();
            string       delidlist = content.Request["delidlist"].ToString();

            if (string.IsNullOrEmpty(delidlist))
            {
                model.code = 1;
                model.msg  = "请选择删除数据";
                return(model);
            }
            delidlist = "" + delidlist.TrimEnd(',') + "";
            try
            {
                bank.deldata(delidlist);
            }
            catch (Exception ex)
            {
                model.code = 1;
                model.msg  = ex.Message;
            }
            return(model);
        }
コード例 #11
0
        /// <summary> 银行按揭信息列表查询
        /// </summary>
        /// <returns></returns>
        public AdminJsonStr getbankList(HttpContext content)
        {
            AdminJsonStr model           = new AdminJsonStr();
            bankDBAccess bank            = new bankDBAccess();
            int          tableTotalCount = 0;

            pageIndex = string.IsNullOrEmpty(content.Request["page"]) //页数
                        ? 1
                        : int.Parse(content.Request["page"].ToString());
            pageSize = string.IsNullOrEmpty(content.Request["limit"]) //页大小
                ? 10
                : int.Parse(content.Request["limit"].ToString());
            string contractNo = string.IsNullOrEmpty(content.Request["contractNo"])
                ? ""
                : content.Request["contractNo"].ToString();
            string stimeR = string.IsNullOrEmpty(content.Request["stimeR"])
                ? ""
                : content.Request["stimeR"].ToString();
            string etimeR = string.IsNullOrEmpty(content.Request["etimeR"])
                ? ""
                : content.Request["etimeR"].ToString();
            string userName = string.IsNullOrEmpty(content.Request["userName"])
                ? ""
                : content.Request["userName"].ToString();
            string clientName = string.IsNullOrEmpty(content.Request["clientName"])
                ? ""
                : content.Request["clientName"].ToString();
            string owenName = string.IsNullOrEmpty(content.Request["owenName"])
                ? ""
                : content.Request["owenName"].ToString();
            string attr = string.IsNullOrEmpty(content.Request["attr"])
                ? ""
                : content.Request["attr"].ToString();
            //string stimeC = string.IsNullOrEmpty(content.Request["stimeC"])
            //    ? ""
            //    : content.Request["stimeC"].ToString();
            //string etimeC = string.IsNullOrEmpty(content.Request["etimeC"])
            //    ? ""
            //    : content.Request["etimeC"].ToString();
            string neiqin = string.IsNullOrEmpty(content.Request["neiqin"])
                ? ""
                : content.Request["neiqin"].ToString();
            string receiveName = string.IsNullOrEmpty(content.Request["receiveName"])
                ? ""
                : content.Request["receiveName"].ToString();
            string selecttype = string.IsNullOrEmpty(content.Request["selecttype"])
                ? ""
                : content.Request["selecttype"].ToString();
            string paytype = string.IsNullOrEmpty(content.Request["paytype"])
                ? ""
                : content.Request["paytype"].ToString();
            string contracttypes = string.IsNullOrEmpty(content.Request["contracttypes"])
                ? ""
                : content.Request["contracttypes"].ToString();
            //str myreceived = string.IsNullOrEmpty(content.Request["myreceived"])
            //    ? false
            //    : Convert.ToBoolean(content.Request["myreceived"].ToString());
            bool less = string.IsNullOrEmpty(content.Request["less"])
                ? false
                : Convert.ToBoolean(content.Request["less"].ToString());
            string subbranchID = string.IsNullOrEmpty(content.Request["subbranchID"])
                ? ""
                : content.Request["subbranchID"].ToString();
            List <bankMortData> list_bank = bank.getbankMortList(contractNo, stimeR, etimeR, userName, clientName,
                                                                 owenName, neiqin, receiveName, selecttype, paytype, less, loginName, attr,
                                                                 subbranchID, contracttypes, pageIndex, pageSize, ref tableTotalCount);

            model.data  = list_bank;
            model.count = tableTotalCount; //所有数据数量
            return(model);
        }