Exemple #1
0
    public static string RejectEdit(string KeyID, string Remark)
    {
        Common.ResultMessage   Msg     = new Common.ResultMessage();
        Hi.Model.YZT_FirstCamp fcmodel = new Hi.BLL.YZT_FirstCamp().GetModel(KeyID.ToInt(0));

        if (fcmodel != null)
        {
            fcmodel.Remark = Remark;
            fcmodel.State  = 1;
            fcmodel.ts     = DateTime.Now;

            if (new Hi.BLL.YZT_FirstCamp().Update(fcmodel))
            {
                Msg.result = true;

                Hi.Model.SYS_Users  usersModel = new Hi.BLL.SYS_Users().GetModel(fcmodel.CreateUserID);
                string              Phone      = usersModel == null ? "" : usersModel.Phone;
                Hi.Model.BD_Company comp       = new Hi.BLL.BD_Company().GetModel(fcmodel.CompID);
                string              compName   = comp == null ? "" : comp.CompName;

                GetPhoneCode pc = new GetPhoneCode();
                pc.SendReject(Phone, compName, Remark);
            }
        }
        else
        {
            Msg.code = "未查找到数据";
        }
        return(new JavaScriptSerializer().Serialize(Msg));
    }
Exemple #2
0
 public void DataBinds()
 {
     try
     {
         int pageCount = 0;
         int Counts    = 0;
         if (this.txtPageSize.Value.ToString() != "")
         {
             if (this.txtPageSize.Value.Trim().Length >= 5)
             {
                 Pager.PageSize         = 100;
                 this.txtPageSize.Value = "100";
             }
             else
             {
                 Pager.PageSize = this.txtPageSize.Value.Trim().ToInt(0);
             }
         }
         List <Hi.Model.BD_Company> LDis = new Hi.BLL.BD_Company().GetList(Pager.PageSize, Pager.CurrentPageIndex, "Createdate", true, SearchWhere(), out pageCount, out Counts);
         this.Rpt_Comp.DataSource = LDis;
         this.Rpt_Comp.DataBind();
         Pager.RecordCount = Counts;
         page = Pager.CurrentPageIndex.ToString();
         this.Org.SelectedValue = this.OrgID == 0 ? Org.SelectedValue : this.OrgID.ToString();
     }
     catch (Exception ex)
     {
         Tiannuo.LogHelper.LogHelper.Error("Error", ex);
     }
 }
Exemple #3
0
    /// <summary>
    /// 统计
    /// </summary>
    public void Bind()
    {
        string str = string.Empty;//compid

        if (this.OrgID != 0)
        {
            List <Hi.Model.BD_Company> l = new Hi.BLL.BD_Company().GetList("ID", "ISNULL(dr,0)=0 and IsEnabled=1  and Auditstate=2 and isnull(orgid,0)=" + this.OrgID, "");
            if (l.Count > 0)
            {
                str = string.Join(",", l.Select(T => T.ID));
                if (!Util.IsEmpty(str))
                {
                    str = str.Substring(0, str.Length - 1);
                    str = " and compid in(" + str + ")";
                }
            }
        }
        //企业统计
        Bind2(this.rptComplist, "BD_Company comp", "comp", "");
        //代理商统计
        Bind2(this.rptDisList, "BD_Distributor dis left join BD_Company comp on dis.CompID=comp.ID", "dis", str);
        //订单统计
        Bind3(this.rptOrderList, str);
        //收款统计
        Bind4(this.rptPriceList, str);
    }
Exemple #4
0
 public void DataBinds()
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     if (comp != null)
     {
         lblPhone.InnerText     = comp.Phone;
         lblFax.InnerText       = comp.Fax;
         lblTel.InnerText       = comp.Tel;
         lblZip.InnerText       = comp.Zip;
         lblPrincipal.InnerText = comp.Principal;
         lblAddress.InnerText   = comp.Address;
         ImgShopLogo.Src        = comp.ShopLogo != "" ? ConfigurationManager.AppSettings["ImgViewPath"] + "CompImage/" + comp.ShopLogo : "";
         ImgCompLogo.Src        = comp.CompLogo != "" ? ConfigurationManager.AppSettings["ImgViewPath"] + "CompImage/" + comp.CompLogo : "";
         ImgNewShopLogo.Src     = comp.CompNewLogo != "" ? ConfigurationManager.AppSettings["ImgViewPath"] + "CompImage/" + comp.CompNewLogo : "";
         string[] PathArry  = comp.FirstBanerImg.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         string   OuterHtml = "";
         foreach (string PathV in PathArry)
         {
             OuterHtml += "<li><img src=\"" + ConfigurationManager.AppSettings["ImgViewPath"] + "CompImage/" + PathV + "\" style=\"margin: 5px 0px 5px 5px; border:1px solid ;  width: 628px; height: 148px;float:left; \"></li>";
         }
         contents = comp.CustomCompinfo;
         contents = contents.Replace("<span", "<p").Replace("</span", "</p");
         if (UserType == 3 || UserType == 4)
         {
             if (comp.OrgID != OrgID)
             {
                 Response.Write("数据不存在");
                 Response.End();
             }
         }
     }
 }
Exemple #5
0
 protected void btn_zx(object sender, EventArgs e)
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     if (comp != null)
     {
         comp.Isorgzx     = 1;
         comp.Orgzxdate   = DateTime.Now;
         comp.IsZXAudit   = 1;
         comp.ZXAuditDate = DateTime.Now;
         comp.ts          = DateTime.Now;
         comp.modifyuser  = Common.UserID();
         if (new Hi.BLL.BD_Company().Update(comp))
         {
             JScript.AlertMsgMo(this, "确认成功", "function(){ window.location.href=window.location.href; }");
         }
         else
         {
             JScript.AlertMsgMo(this, "确认失败", "function(){ window.location.href=window.location.href; }");
         }
     }
     else
     {
         JScript.AlertMsgMo(this, "厂商不存在", "function(){ window.location.href=window.location.href; }");
     }
 }
Exemple #6
0
    /// <summary>
    /// 修改绑定
    /// </summary>
    public void Bind()
    {
        string ContID = Request.QueryString["cid"];

        if (!string.IsNullOrWhiteSpace(ContID))
        {
            Hi.Model.YZT_Contract contractModel = new Hi.BLL.YZT_Contract().GetModel(Convert.ToInt32(ContID));
            if (contractModel != null)
            {
                Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(Convert.ToInt32(contractModel.CompID));
                if (comp != null)
                {
                    this.txtCompName.Value = comp.CompName;
                    this.contractCompId    = comp.ID;
                    if (this.CompID <= 0)
                    {
                        this.hidCompId.Value = comp.ID.ToString();
                    }
                }
                this.txtcontractNO.Value   = contractModel.contractNO;
                this.txtcontractDate.Value = contractModel.contractDate.ToString("yyyy-MM-dd");
                this.txtForceDate.Value    = contractModel.ForceDate.ToString("yyyy-MM-dd");
                this.txtInvalidDate.Value  = contractModel.InvalidDate.ToString("yyyy-MM-dd");
                this.txtRemark.Value       = contractModel.Remark;
                this.txtState.Value        = contractModel.CState.ToString() == "1" ? "启用" : "停用";
            }

            DataTable dt = new Hi.BLL.YZT_ContractDetail().getDataTable(ContID);
            if (dt.Rows.Count > 0)
            {
                this.RepContractDetail.DataSource = dt;
                this.RepContractDetail.DataBind();
            }
        }
    }
Exemple #7
0
 protected void btnBind_Click(object sender, EventArgs e)
 {
     try
     {
         if (Org.SelectedValue != "-1" || salemanid.Value == "" || salemanid.Value == "-1")
         {
             Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
             if (comp != null)
             {
                 comp.OrgID = int.Parse(Org.SelectedValue);
                 if (UserType == 3 || UserType == 4)
                 {
                     comp.OrgID = OrgID;
                 }
                 comp.SalesManID = int.Parse(salemanid.Value);
                 new Hi.BLL.BD_Company().Update(comp);
                 ClientScript.RegisterStartupScript(this.GetType(), "msg", "<script>window.location.href='CompInfo.aspx?KeyID=" + KeyID + "';</script>");
             }
         }
         else
         {
             ClientScript.RegisterStartupScript(this.GetType(), "msg", "<script>alert('请选择业务员或机构');</script>");
         }
     }
     catch (Exception ex)
     {
         ClientScript.RegisterStartupScript(this.GetType(), "msg", "<script>alert('绑定失败');</script>");
     }
 }
Exemple #8
0
 protected void btn_NUse(object sender, EventArgs e)
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     comp.IsEnabled  = 0;
     comp.ts         = DateTime.Now;
     comp.modifyuser = UserID;
     if (new Hi.BLL.BD_Company().Update(comp))
     {
         //List<Hi.Model.SYS_Users> user = new Hi.BLL.SYS_Users().GetList("", " isnull(dr,0)=0 and compid=" + KeyID + "", "");
         //foreach (Hi.Model.SYS_Users model1 in user)
         //{
         //    model1.IsEnabled = 0;
         //    model1.ts = DateTime.Now;
         //    model1.modifyuser = UserID;
         //    new Hi.BLL.SYS_Users().Update(model1);
         //}
         List <Hi.Model.BD_Distributor> dis = new Hi.BLL.BD_Distributor().GetList("", " isnull(dr,0)=0 and compid=" + KeyID + "", "");
         foreach (Hi.Model.BD_Distributor model2 in dis)
         {
             model2.IsEnabled  = 0;
             model2.ts         = DateTime.Now;
             model2.modifyuser = UserID;
             new Hi.BLL.BD_Distributor().Update(model2);
         }
         JScript.AlertMsgMo(this, "用户禁用成功", "function(){ window.location.href='CompList.aspx'; }");
     }
 }
Exemple #9
0
    private void Bind()
    {
        List <Hi.Model.BD_Company> LComp = null;

        if (HttpRuntime.Cache.Get("hotShop_RPT") == null)
        {
            LComp = new Hi.BLL.BD_Company().GetList("top 6 CompName,ID,CompLogo,ShortName,ShopLogo", " dr=0 and AuditState=2  and FirstShow=1  and IsEnabled=1 ", " SortIndex desc,id ");
            HttpRuntime.Cache.Insert("hotShop_RPT", LComp, null, DateTime.Now.AddMinutes(60), System.Web.Caching.Cache.NoSlidingExpiration);
        }
        else
        {
            LComp = HttpRuntime.Cache["hotShop_RPT"] as List <Hi.Model.BD_Company>;
        }
        hotShop_RPT.DataSource = LComp;
        hotShop_RPT.DataBind();

        List <Hi.Model.BD_Goods> LGood = null;

        if (HttpRuntime.Cache.Get("hotGood_RPT") == null)
        {
            string SqlQuery = " isnull(Pic2,'')<>'' and BD_Goods.dr=0 and IsOffline=1 ";
            LGood = new Hi.BLL.BD_Goods().GetList(" top 5 * ", SqlQuery, " BD_Goods.ID ");
            HttpRuntime.Cache.Insert("hotGood_RPT", LGood, null, DateTime.Now.AddMinutes(60), System.Web.Caching.Cache.NoSlidingExpiration);
        }
        else
        {
            LGood = HttpRuntime.Cache["hotGood_RPT"] as List <Hi.Model.BD_Goods>;
        }
        hotGoods_RPT.DataSource = LGood;
        hotGoods_RPT.DataBind();
    }
Exemple #10
0
 //保存首页显示排序
 protected void btnSaveSort_click(object sender, EventArgs e)
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     comp.SortIndex = Common.NoHTML(txtSort.Value.Trim());
     if (new Hi.BLL.BD_Company().Update(comp))
     {
         JScript.AlertMsgMo(this, "保存成功!", "function(){}");
     }
 }
Exemple #11
0
 public void DataBinds()
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(CompID);
     if (comp != null)
     {
         txtCustomInfo.Text       = comp.CustomCompinfo;
         div_CustomInfo.InnerHtml = comp.CustomCompinfo;
     }
 }
Exemple #12
0
 public void DataBindLink()
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     if (comp != null)
     {
         if (!string.IsNullOrEmpty(comp.Attachment))
         {
             string[] files = comp.Attachment.Split(new char[] { ',' });
             foreach (string file in files)
             {
                 if (!string.IsNullOrEmpty(file))
                 {
                     LinkButton linkFile = new LinkButton();
                     linkFile.Click += new EventHandler(Download_Click);
                     if (file.LastIndexOf("_") != -1)
                     {
                         string text = file.Substring(0, file.LastIndexOf("_")) + Path.GetExtension(file);
                         if (text.Length < 15)
                         {
                             linkFile.Text = text;
                         }
                         else
                         {
                             linkFile.Text = text.Substring(0, 15) + "...";
                         }
                         linkFile.Attributes.Add("title", text);
                     }
                     else
                     {
                         string text = file.Substring(0, file.LastIndexOf("-")) + Path.GetExtension(file);
                         if (text.Length < 15)
                         {
                             linkFile.Text = text;
                         }
                         else
                         {
                             linkFile.Text = text.Substring(0, 15) + "...";
                         }
                         linkFile.Attributes.Add("title", text);
                     }
                     linkFile.Style.Add("margin-right", "5px");
                     linkFile.Style.Add("text-decoration", "underline");
                     linkFile.Attributes.Add("fileName", file);
                     HtmlGenericControl div = new HtmlGenericControl("div");
                     div.Controls.Add(linkFile);
                     //HtmlImage img = new HtmlImage();
                     //img.Src = "../../images/icon_del.png";
                     //img.Attributes.Add("title", "删除附件");
                     //img.Attributes.Add("onclick", "AnnexDel(this,'Comp'," + KeyID + ",'" + file + "')");
                     //div.Controls.Add(img);
                     DFile.Controls.Add(div);
                 }
             }
         }
     }
 }
Exemple #13
0
 public void DataBinds()
 {
     //绑定服务日期
     //List<Hi.Model.Pay_Service> serviceord = new Hi.BLL.Pay_Service().GetList("*", " compid=" + KeyID + " and isaudit=1 and outofdata=0 ", " createdate desc");
     //if (serviceord.Count > 0)
     //{
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     txtCreateDate.Value    = comp.EnabledStartDate.ToString("yyyy-MM-dd") == "0001-01-01" ? "" : comp.EnabledStartDate.ToString("yyyy-MM-dd");//存在有效服务
     txtEndCreateDate.Value = comp.EnabledEndDate.ToString("yyyy-MM-dd") == "0001-01-01" ? "" : comp.EnabledEndDate.ToString("yyyy-MM-dd");
     //}
 }
Exemple #14
0
    public void DataBinds()
    {
        int pageCount = 0;
        int Counts    = 0;
        List <Hi.Model.BD_Company> LDis = new Hi.BLL.BD_Company().GetList(Pager.PageSize, Pager.CurrentPageIndex, "Createdate", false, SearchWhere(), out pageCount, out Counts);

        this.Rpt_Comp.DataSource = LDis;
        this.Rpt_Comp.DataBind();
        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }
Exemple #15
0
    public void DataBinds()
    {
        Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(CompID);
        if (comp != null)
        {
            if (comp.ShortName == "" && comp.CompName.Length <= 12)
            {
                txtShortName.Value = comp.CompName;
            }
            else
            {
                txtShortName.Value = comp.ShortName;
            }
            txtOrcode.Value            = comp.OrganizationCode;
            txtCompName.Value          = comp.CompName;
            lblCompCode.InnerText      = comp.CompCode;
            txtTel.Value               = comp.Tel;
            txtZip.Value               = comp.Zip;
            txtFax.Value               = comp.Fax;
            txtLicence.Value           = comp.creditCode;
            txtAccount.Value           = comp.Account;
            txtAddress.Value           = comp.Address;
            txtLegal.Value             = comp.Legal;
            txtIdentitys.Value         = comp.Identitys;
            txtPrincipal.Value         = comp.Principal;
            txtPhone.Value             = comp.Phone;
            txtInfo.Value              = comp.ManageInfo;
            txtLegalTel.Value          = comp.LegalTel;
            txtIndusName.SelectedValue = comp.IndID.ToString();
            QQ.Value = comp.QQ;
            if (comp.HotShow == 0)
            {
                rdHotShowNo.Checked  = true;
                rdHotShowYes.Checked = false;
            }

            //txtFinanceCode.Value = comp.FinanceCode.ToString();
            //txtFinanceName.Value = comp.FinanceName.ToString();
            List <Hi.Model.SYS_CompUser> user2 = new Hi.BLL.SYS_CompUser().GetList("", "  isnull(dr,0)=0 and  compid='" + CompID + "' and utype=4", "");
            if (user2.Count > 0)
            {
                Hi.Model.SYS_Users user = new Hi.BLL.SYS_Users().GetModel(user2[0].UserID);

                if (user != null)
                {
                    txtUsername.Disabled  = true;
                    txtUserPhone.Disabled = true;
                    txtUsername.Value     = user.UserName;
                    txtUserPhone.Value    = user.Phone;
                    txtUserTrueName.Value = user.TrueName;
                }
            }
        }
    }
Exemple #16
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(CompID);
     if (comp != null)
     {
         comp.CustomCompinfo = txtCustomInfo.Text;
         if (new Hi.BLL.BD_Company().Update(comp))
         {
             JScript.AlertMsgMo(this, "操作成功", "function(){ window.location.href=window.location.href; }");
         }
     }
 }
Exemple #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["Comid"].Trim() != "")
     {
         Compid        = Convert.ToInt32(Request["Comid"].Trim());
         storeCode.Src = ConfigurationManager.AppSettings["ImgViewPath"] + "CompImg/qr_" + Request["Comid"].Trim() + ".jpg";
         Hi.Model.BD_Company compl = new Hi.BLL.BD_Company().GetModel(Convert.ToInt32(Request["Comid"].Trim()));
         if (compl != null)
         {
             phone         = compl.Phone == "" || compl.Phone == null ? compl.Tel : compl.Phone;
             qqtrueOrfalse = string.IsNullOrWhiteSpace(compl.QQ) ? "none" : "block";
             qq            = compl.QQ;
         }
     }
 }
Exemple #18
0
    //查询数据
    public void loadData()
    {
        string builder = string.Empty;

        LoginModel user = Session["UserModel"] as LoginModel;

        if (user != null)
        {
            builder = @" and yc.id in ( select fca.CMID from YZT_FCArea fca left join BD_Distributor dis on (fca.Province+fca.City+fca.Area=dis.Province+dis.City+dis.Area or fca.Province+fca.City=dis.Province+dis.City or fca.Province=dis.Province) and dis.IsEnabled=1 where 1=1 and dis.ID=" + user.DisID + " and fca.CompID=" + user.CompID + " union select fcd.CMID from YZT_FCDis fcd where fcd.DisID=" + user.DisID + "and fcd.CompID=" + user.CompID + " union select ID from YZT_CMerchants where type=1 and dr=0 and isnull(IsEnabled,0)=1)";
        }
        else
        {
            builder = @" and yc.Type=1 and isnull(yc.IsEnabled,0)=1";
        }

        //查询企业数据
        List <Hi.Model.BD_Company> comps = new Hi.BLL.BD_Company().GetList("id,CompName", " dr=0 and IsEnabled=1 and AuditState=2 and exists(select 1 from YZT_CMerchants  yc  where yc.InvalidDate >=getdate() and yc.CompID = BD_Company.id " + builder + ")", " AuditState");

        Rp_Production.DataSource = comps;
        Rp_Production.DataBind();

        string gtypeids = string.Empty;
        string sql      = "select g.CategoryID,gt.* from  YZT_CMerchants yc  left join BD_GoodsInfo info   on info.ID=yc.GoodsID left join BD_Goods g on g.ID=info.GoodsID left join SYS_GType gt on gt.ID=g.CategoryID where isnuLL(gt.dr,0)=0 and isnuLL(gt.IsEnabled,0)=1 " + builder;

        DataTable dt = SqlHelper.GetTable(SqlHelper.LocalSqlServer, sql);

        if (dt != null && dt.Rows.Count > 0)
        {
            foreach (DataRow item in dt.Rows)
            {
                if (item["deep"].ToString() == "1")
                {
                    gtypeids += gtypeids != "" ? "," + item["ID"].ToString() : item["ID"].ToString();
                }
                else
                {
                    string cid = getCategoryDet(item["ParentId"].ToString());
                    gtypeids += gtypeids != "" ? "," + cid : cid;
                }
            }
        }

        //查询商品一级分类数据
        List <Hi.Model.SYS_GType> gtypes = new Hi.BLL.SYS_GType().GetList("id,TypeName", " dr=0 and IsEnabled=1 and deep=1 and id in(" + gtypeids + ")", "createdate");

        Rp_Category1.DataSource = gtypes;
        Rp_Category1.DataBind();
    }
Exemple #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        object obj = Request["action"];

        if (obj != null)
        {
            //选中的商品
            if (obj.ToString() == "Pay")
            {
                string type = Request["type"] + "";
                Response.Write(AddOrder(type));
                Response.End();
            }
        }
        if (!IsPostBack)
        {
            LoginModel logUser = Session["UserModel"] as LoginModel;
            if (logUser != null)
            {
                Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(Convert.ToInt32(logUser.CompID));
                if (comp != null)
                {
                    if (comp.EnabledEndDate.ToString() == "0001/1/1 0:00:00")
                    {
                        //没有任何服务记录
                    }
                    else if (comp.EnabledEndDate < DateTime.Now.AddDays(1))
                    {
                        //服务已过期
                        // Msg.InnerHtml = "您的服务期限已过,请尽快购买服务";
                    }
                    else
                    {
                        //服务日期有效
                        //  Msg.InnerHtml = "您当前服务期限:"+ comp.EnabledEndDate.ToString("yyyy-MM-dd") + "";
                    }
                }

                //绑定支付记录
                List <Hi.Model.Pay_Service> deleteList = new Hi.BLL.Pay_Service().GetList("*", " CompID=" + logUser.CompID + "  and IsAudit=1 ", " createdate desc");
                Services.DataSource = deleteList;
                Services.DataBind();
            }
        }
    }
Exemple #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["KeyId"] != null)
            {
                int payid = Convert.ToInt32(Common.DesDecrypt(Request["KeyId"].ToString(), Common.EncryptKey));
                Hi.Model.PAY_Payment payment = payservice.GetModel(payid);
                if (payment != null)
                {
                    //订单编号
                    Hi.Model.DIS_Order order = new Hi.BLL.DIS_Order().GetModel(payment.OrderID);

                    if (payment.vdef4 != null)
                    {
                        lblNo.Text = payment.guid.Trim();
                    }
                    lblPayDate.Text = Convert.ToDateTime(payment.PayDate).ToString("yyyy-MM-dd HH:mm");
                    //付款方
                    Hi.Model.BD_Distributor dis = new Hi.BLL.BD_Distributor().GetModel(payment.DisID);
                    lblDisName.Text = payment.PayUser;

                    //收款方
                    Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(order.CompID);
                    lblCompName.Text = comp.CompName;
                    List <Hi.Model.PAY_PaymentBank> LBank = new Hi.BLL.PAY_PaymentBank().GetList(" top 1 accountName,bankCode ", " CompID=" + dis.CompID + " and dr=0 ", " Isno desc ");
                    if (LBank.Count > 0)
                    {
                        Hi.Model.PAY_PaymentBank bank = LBank[0];
                        lblBank2.Text = "(" + bank.AccountName + " &nbsp; " + bank.bankcode + ")";
                    }
                    //资金
                    lblPayPrice.Text   = Convert.ToDecimal(payment.PayPrice).ToString("N");
                    lblPayPriceDX.Text = CmycurD(payment.PayPrice);
                    if (!string.IsNullOrEmpty(payment.vdef5))
                    {
                        lblSXFPrice.Text = Convert.ToDecimal(payment.vdef5).ToString("N");
                    }


                    lblOrderNo.Text = order.ReceiptNo;
                }
            }
        }
    }
Exemple #21
0
    public void DataBinds()
    {
        Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(CompID);
        if (comp != null)
        {
            lblShortName.InnerText = comp.ShortName;
            lblCompName.InnerText  = comp.CompName;
            lblCompCode.InnerText  = comp.CompCode;
            lblTel.InnerText       = comp.Tel;
            lblLicence.InnerText   = comp.creditCode;
            lblOrCode.InnerText    = comp.OrganizationCode;
            lblZip.InnerText       = comp.Zip;
            lblFax.InnerText       = comp.Fax;
            lblAccount.InnerText   = comp.Account;
            lblAddress.InnerText   = comp.Address;
            lblIndusName.Id        = comp.IndID.ToString();
            lblLegal.InnerText     = comp.Legal;
            lblIdentitys.InnerText = comp.Identitys;
            lblPrincipal.InnerText = comp.Principal;
            lblPhone.InnerText     = comp.Phone;
            lblInfo.InnerText      = comp.ManageInfo;
            lblLegalTel.InnerText  = comp.LegalTel;
            lblIsHot.InnerHtml     = comp.HotShow == 1 ? "是" : "<i style='color:red;'>否</i>";
            QQ.InnerHtml           = comp.QQ;
            //lblFinanceCode.InnerText = comp.FinanceCode;
            //lblFinanceName.InnerText = comp.FinanceName;
            List <Hi.Model.SYS_CompUser> user2 = new Hi.BLL.SYS_CompUser().GetList("", "  isnull(dr,0)=0 and  compid='" + CompID + "' and utype=4", "");
            if (user2.Count > 0)
            {
                Hi.Model.SYS_Users user = new Hi.BLL.SYS_Users().GetModel(user2[0].UserID);

                if (user != null)
                {
                    //List<Hi.Model.SYS_Users> user = new Hi.BLL.SYS_Users().GetList("", "  isnull(dr,0)=0 and  compid='" + CompID + "' and type=4", "");
                    // if (user.Count > 0)
                    // {
                    lblUsername.InnerText     = user.UserName;
                    lblUserPhone.InnerText    = user.Phone;
                    lblUserTrueName.InnerText = user.TrueName;
                }
            }
        }
    }
Exemple #22
0
    /// <summary>
    /// 初始化参数
    /// </summary>
    private void initiParams(string Compid)
    {
        List <Hi.Model.BD_Company> Comp = new Hi.BLL.BD_Company().GetList("", " isnull(dr,0)=0 and ID=" + Compid + "", "");

        if (Comp.Count > 0)
        {
            CompID  = Comp[0].ID;
            Erptype = Comp[0].Erptype;
            List <Hi.Model.SYS_Users> User = new Hi.BLL.SYS_Users().GetList("", " isnull(dr,0)=0 and Type=4 and CompID=" + CompID + "", "");
            if (User.Count > 0)
            {
                UserID = User[0].ID;
            }
        }
        else
        {
            throw new Exception("数据导入失败,查找不到compid:(" + Compid + ")的企业");
        }
    }
Exemple #23
0
    /// <summary>
    /// 获得企业列表
    /// </summary>
    /// <param name="JSon"></param>
    /// <returns></returns>
    public ResultList GetCompanyList(string JSon)
    {
        try
        {
            string userID = string.Empty;

            JsonData JInfo = JsonMapper.ToObject(JSon);

            List <Company> compList = new List <Company>();

            List <Hi.Model.BD_Company> ListComp = new Hi.BLL.BD_Company().GetList("*", " isnull(dr,0)=0 and AuditState=2 and IsEnabled=1", "ID desc");

            if (ListComp != null)
            {
                foreach (Hi.Model.BD_Company comp in ListComp)
                {
                    Company com = new Company();
                    com.CompanyID    = comp.ID;
                    com.CompanyName  = comp.CompName;
                    com.CompLogo     = comp.CompLogo;
                    com.Contact      = comp.Principal;
                    com.ContactPhone = comp.Phone;
                    com.Address      = comp.CompAddr + comp.Address;
                    compList.Add(com);
                }
            }

            return(new ResultList()
            {
                Result = "T",
                Description = "获取成功",
                CompanyList = compList
            });
        }
        catch (Exception ex)
        {
            Common.CatchInfo(ex.Message + ":" + ex.StackTrace, "GetCompanyList :" + JSon);
            return(new ResultList()
            {
                Result = "F", Description = "异常"
            });
        }
    }
Exemple #24
0
    public void DataBindS()
    {
        LPayOpen = new Hi.BLL.PAY_OpenAccount().GetList("", " isnull(dr,0)=0 and CompID=" + CompID + " and DisID=0", "");
        if (LPayOpen.Count > 0)
        {
            btnupdate.Text = "确定修改";

            txtOgCode.Attributes["disabled"] = "disabled";
            txtOgCode.Value                = LPayOpen[0].AccNumver;
            txtAccName.Value               = LPayOpen[0].AccName;
            txtAccountName.Value           = LPayOpen[0].AccountName;
            ddlAccountNature.SelectedValue = LPayOpen[0].AccountNature.ToString();
            txtDocumentCode.Value          = LPayOpen[0].DocumentCode;
            ddlDocumentType.SelectedValue  = LPayOpen[0].DocumentType;
            txtOrgCode.Value               = LPayOpen[0].OrgCode;
            txtBusinessLicense.Value       = LPayOpen[0].BusinessLicense;
            txtAccAddress.Value            = LPayOpen[0].AccAddress;
            ddlSex.SelectedValue           = LPayOpen[0].Sex.ToString();
            txtNationality.Value           = LPayOpen[0].Nationality;
            txtPhoneNumbe.Value            = LPayOpen[0].PhoneNumbe;
            txtPhone.Value    = LPayOpen[0].Phone;
            txtEmail.Value    = LPayOpen[0].Email;
            txtFax.Value      = LPayOpen[0].Fax;
            txtPostcode.Value = LPayOpen[0].Postcode;
        }
        else
        {
            txtOgCode.Value = ConfigurationManager.AppSettings["OrgCode"] + "(自动生成)";
            txtOgCode.Attributes["disabled"] = "disabled";

            Hi.Model.BD_Company compModel = new Hi.BLL.BD_Company().GetModel(CompID);

            if (compModel != null)
            {
                this.txtAccName.Value               = compModel.CompName.ToString();
                this.txtAccountName.Value           = compModel.Legal.ToString();
                this.ddlAccountNature.SelectedValue = "2";
                this.ddlDocumentType.SelectedValue  = "1";
                this.txtDocumentCode.Value          = compModel.Identitys;
                this.txtAccAddress.Value            = compModel.Address;
            }
        }
    }
Exemple #25
0
 public void DataBinds()
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(CompID);
     if (comp != null)
     {
         if (Request["back"] == "0")
         {
             btnback.Visible = false;
         }
         txtTel.Value         = comp.Tel;
         txtFax.Value         = comp.Fax;
         txtPrincipal.Value   = comp.Principal;
         this.BrandIfon.Value = comp.BrandInfo;
         if (comp.CustomCompinfo == null || comp.CustomCompinfo == "")
         {
             txtCustomInfo.Text = "本公司产品种类丰富、质量优良、价格公道、服务周到。感谢您长期的支持与厚爱,您的满意是我们最高的追求,我们将竭诚为您提供优质、贴心的服务!";
         }
         else
         {
             txtCustomInfo.Text = comp.CustomCompinfo;
         }
         txtAddress.Value = comp.Address;
         ImgCompLOGO.Src  = comp.CompLogo != "" ? ConfigurationManager.AppSettings["ImgViewPath"] + "../CompImage/" + comp.CompLogo : "";
         if (comp.CompLogo != "")
         {
             ImgCompName.Visible = false;
         }
         else
         {
             CompLogoI.Visible = true;
             ImgCompLOGO.Style.Add("display", "none");
         }
         txtPhone.Value      = comp.Phone;
         spImgName.InnerText = comp.CompName;
         HDCompPath.Value    = comp.CompLogo;
     }
     else
     {
         Response.Write("未找到数据");
         Response.End();
     }
 }
Exemple #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Hi.Model.SYS_Users user = LoginModel.IsLoginAllUser();
            if (user != null)
            {
                txt_Phone.Value = user.Phone;
            }
            LiteralJS.Text = " $.BindRegister(\"RegiComp\");" + (user == null ? "" : "$('#txt_Phone').trigger('blur');") + "";
            if (!string.IsNullOrEmpty(Request["Comid"]))
            {
                Hi.Model.BD_Company Comp = new Hi.BLL.BD_Company().GetModel(Request["Comid"].ToInt(0));
                if (Comp == null)
                {
                    return;
                }
                else if (Comp.dr == 1)
                {
                    return;
                }
                else if (Comp.AuditState != 2)
                {
                    return;
                }
                else if (Comp.IsEnabled != 1)
                {
                    return;
                }

                Compid                = Comp.ID;
                HidCompid.Value       = Request["Comid"];
                CompDisName.InnerHtml = "代理商名称:";
                Title_type.InnerHtml  = Comp.CompName + " - 代理商加盟";
                //Title = ConfigurationManager.AppSettings["TitleName"].ToString() + " - 代理商加盟";
                LiteralJS.Text = " $.BindRegister(\"RegiDis\"," + Comp.ID + ");" + (user == null ? "" : "$('#txt_Phone').trigger('blur');") + "";
            }
            //操作日志统计开始
            Utils.WritePageLog(Request, "卖家注册");
            //操作日志统计结束
        }
    }
Exemple #27
0
    public void PrincipalBind()
    {
        List <Hi.Model.BD_Company> ComList = new Hi.BLL.BD_Company().GetList("", " dr=0  and id=" + CompID + "", "");

        if (ComList.Count > 0)
        {
            string[] PathArry  = ComList[0].FirstBanerImg.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            string   OuterHtml = "";
            int      index     = 0;
            foreach (string PathV in PathArry)
            {
                index++;
                OuterHtml += "<li id=\"Banner_" + index + "\" _src=\"url(" + ConfigurationManager.AppSettings["ImgViewPath"] + "CompImage/" + PathV + ")\" ><a href=\"javascript:;\"></a></li>";
            }
            BannerUl.InnerHtml     = OuterHtml;
            lblPrincipal.InnerHtml = "<i>联系人:</i>" + ComList[0].Principal;
            lblPhone.InnerHtml     = "<i>电 话:</i>" + ComList[0].Phone;
            lblAddress.InnerHtml   = "<i>地 址:</i>" + ComList[0].Address;
        }
    }
Exemple #28
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     if (comp != null)
     {
         comp.Tel            = Common.NoHTML(txtTel.Value.Trim());
         comp.Zip            = Common.NoHTML(txtZip.Value.Trim());
         comp.Fax            = Common.NoHTML(txtFax.Value.Trim());
         comp.Principal      = Common.NoHTML(txtPrincipal.Value.Trim());
         comp.Address        = Common.NoHTML(txtAddress.Value.Trim());
         comp.CompLogo       = Common.NoHTML(HDCompPath.Value);
         comp.ShopLogo       = Common.NoHTML(HdShopLogoPath.Value);
         comp.CompNewLogo    = Common.NoHTML(HdNewShopLogoPath.Value);
         comp.CustomCompinfo = txtCustomInfo.Text;
         if (txtPhone.Value.Trim() == "")
         {
             List <Hi.Model.SYS_CompUser> User2 = new Hi.BLL.SYS_CompUser().GetList("", " dr=0 and utype=4 and CompID=" + KeyID + "", "");
             if (User2.Count > 0)
             {
                 Hi.Model.SYS_Users User = new Hi.BLL.SYS_Users().GetModel(User2[0].UserID);
                 if (User != null)
                 {
                     comp.Phone = User.Phone;
                 }
             }
             //List<Hi.Model.SYS_Users> User = new Hi.BLL.SYS_Users().GetList("", " dr=0 and type=4 and CompID=" + KeyID + "", "");
             //if (User.Count > 0)
             //{
             //    comp.Phone = User[0].Phone;
             //}
         }
         else
         {
             comp.Phone = Common.NoHTML(txtPhone.Value.Trim());
         }
         if (new Hi.BLL.BD_Company().Update(comp))
         {
             Response.Redirect("CompFixture.aspx?KeyID=" + KeyID);
         }
     }
 }
Exemple #29
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(CompID);
     if (comp != null)
     {
         comp.Tel       = Common.NoHTML(txtTel.Value.Trim());
         comp.Fax       = Common.NoHTML(txtFax.Value.Trim());
         comp.Principal = Common.NoHTML(txtPrincipal.Value.Trim());
         comp.Address   = Common.NoHTML(txtAddress.Value.Trim());
         if (txtPhone.Value.Trim() != "")
         {
             comp.Phone = Common.NoHTML(txtPhone.Value.Trim());
         }
         else
         {
             List <Hi.Model.SYS_CompUser> User2 = new Hi.BLL.SYS_CompUser().GetList("", " dr=0 and utype=4 and CompID=" + CompID + "", "");
             if (User2.Count > 0)
             {
                 Hi.Model.SYS_Users User = new Hi.BLL.SYS_Users().GetModel(User2[0].UserID);
                 if (User != null)
                 {
                     comp.Phone = Common.NoHTML(User.Phone);
                 }
             }
         }
         comp.BrandInfo      = Common.NoHTML(this.BrandIfon.Value.Trim());
         comp.CompLogo       = Common.NoHTML(HDCompPath.Value);
         comp.CustomCompinfo = txtCustomInfo.Text;
         if (new Hi.BLL.BD_Company().Update(comp))
         {
             if (Request["nextstep"] + "" == "1")
             {
                 JScript.AlertMethod(this, "恭喜您成功入驻医站通,您的商城您做主,尽情享受您的电商之旅吧!", JScript.IconOption.笑脸, "function () { onlinkOrder('../newOrder/orderBuy.aspx', 'dkxd') }");
             }
             else
             {
                 Response.Redirect("CompInfo.aspx");
             }
         }
     }
 }
Exemple #30
0
 protected void btnSubMit_Click(object sender, EventArgs e)
 {
     Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(KeyID);
     if (comp != null)
     {
         if (string.IsNullOrWhiteSpace(txtCreateDate.Value.Trim()))
         {
             JScript.AlertMsg(this, "起始日期不能为空");
             return;
         }
         if (string.IsNullOrWhiteSpace(txtEndCreateDate.Value.Trim()))
         {
             JScript.AlertMsg(this, "结束日期不能为空");
             return;
         }
         comp.EnabledStartDate = Convert.ToDateTime(txtCreateDate.Value);
         comp.EnabledEndDate   = Convert.ToDateTime(txtEndCreateDate.Value);
         new Hi.BLL.BD_Company().Update(comp);
         ClientScript.RegisterStartupScript(this.GetType(), "MSG", "<script>window.parent.location.href=window.parent.location.href; </script>");
     }
 }