Exemple #1
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        DataTable ht = new Hi.BLL.YZT_Library().getHtDrop(DisID.ToString());

        this.HtDrop.DataSource     = ht;
        this.HtDrop.DataTextField  = "hospital";
        this.HtDrop.DataValueField = "hospital";
        this.HtDrop.DataBind();

        string PaymentID = Request.QueryString["KeyID"];

        this.PaymentID.Value = PaymentID;
        if (!string.IsNullOrWhiteSpace(PaymentID))
        {
            Hi.Model.YZT_Payment paymentModel = new Hi.BLL.YZT_Payment().GetModel(Convert.ToInt32(PaymentID));
            if (paymentModel != null)
            {
                this.PaymentNO.Value      = paymentModel.PaymentNO;
                this.PaymentDate.Value    = paymentModel.PaymentDate.ToString("yyyy-MM-dd");
                this.IState.Value         = paymentModel.IState.ToString();
                this.PaymentAmount.Value  = paymentModel.PaymentAmount.ToString("#0.00");
                this.Remark.Value         = paymentModel.Remark.ToString();
                this.HtDrop.SelectedValue = paymentModel.hospital.ToString();
                this.HtDrop.Enabled       = false;
            }

            List <Hi.Model.YZT_PaymentDetail> libraryDetailList = new Hi.BLL.YZT_PaymentDetail().GetList("", " dr=0 and PaymentID=" + PaymentID + "", "");
            Rep_StorageDetail.DataSource = libraryDetailList;
            Rep_StorageDetail.DataBind();
            if (libraryDetailList.Count > 0)
            {
                oneTR.Visible = false;
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable ht = new Hi.BLL.YZT_Library().getHtDrop(DisID.ToString());
         this.HtDrop.DataSource     = ht;
         this.HtDrop.DataTextField  = "hospital";
         this.HtDrop.DataValueField = "hospital";
         this.HtDrop.DataBind();
         this.index.Value          = Request.QueryString["index"];
         this.hidhtId.Value        = Request["id"] + "";
         this.HtDrop.SelectedValue = Request["id"] + "";
         Bind();
     }
 }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //user = LoginModel.IsLogined(this);
        //string DisId = Request["disId"] + "";
        this.hidID.Value = this.DisID.ToString();
        Phone            = new Hi.BLL.SYS_Users().GetModel(this.UserID).Phone;
        dis = new Hi.BLL.BD_Distributor().GetModel(DisID);
        if (dis != null)
        {
            disphone = dis.Phone;
        }
        else
        {
            disphone = "该代理商不存在";
        }

        Bind(DisID.ToString());
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            hidDisID.Value         = DisID.ToString();
            this.hidUserType.Value = this.TypeID.ToString();
            if (!string.IsNullOrEmpty(Request["top"]))
            {
                top = Request["top"].ToInt(0);
            }

            if (top == 0)
            {
                navigation2.Attributes.Add("href", "orderBuy.aspx");
            }
            else if (top == 2)
            {
                navigation2.Attributes.Add("href", "../ReceivingList.aspx");
            }
            else if (top == 3)
            {
                navigation2.Attributes.Add("href", "../pay/orderPayList.aspx");
            }
            else if (top == 4)//线下付款成功,刷新页面
            {
                ClientScript.RegisterStartupScript(this.GetType(), "payshowTop", "<script>TopShow();</script>");
            }
            else if (top == 5) //确认签收
            {
                ClientScript.RegisterStartupScript(this.GetType(), "payshowTop", "<script>TopSignShow();</script>");
            }


            databind();
        }
    }
Exemple #5
0
    /// <summary>
    /// 绑定
    /// </summary>
    public void Bind()
    {
        int    pageCount = 0;
        int    Counts    = 0;
        string strWhere  = string.Empty;

        if (!string.IsNullOrWhiteSpace(this.textName.Value.Trim()))
        {
            strWhere += string.Format(" and CompName like '%{0}%'  ", this.textName.Value.Trim());
        }

        Pager.PageSize = this.txtPager.Value.ToInt(0);

        DataTable table = new Hi.BLL.YZT_FCmaterials().getCompDataTable(Pager.PageSize, Pager.CurrentPageIndex, DisID.ToString(), strWhere, out pageCount, out Counts);

        this.rptOrder.DataSource = table;
        this.rptOrder.DataBind();

        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }
Exemple #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.hidType2.Value = Request.QueryString["type"] + "";
            this.hidDisID.Value = this.DisID.ToString();
            this.hidKeyId.Value = KeyID.ToString();

            StringBuilder strwhere = new StringBuilder();
            Fanli = OrderInfoType.rdoOrderAudit("订单支付返利是否启用", CompID).ToInt(0);
            this.hidFanl.Value = Fanli.ToString();
            LoginModel logUser = Session["UserModel"] as LoginModel;
            Common.ListComps(this.ddrComp, this.UserID.ToString(), this.CompID.ToString());
            this.hidCompId.Value = this.ddrComp.Value.ToString();

            decimal CreditAmount = 0;
            if (BLL.Common.GetCredit(this.hidCompId.Value.ToString().ToInt(0), logUser.DisID, out CreditAmount))
            {
                decimal GetSumAmount = OrderInfoType.GetSumAmount(logUser.DisID.ToString(), this.hidCompId.Value.ToString(), KeyID);
                if (GetSumAmount >= CreditAmount)
                {
                    this.Msg.InnerHtml = "您的授信额度(" + CreditAmount + ")已用完或超出!无法下单";
                    this.Btn.InnerHtml = "<a href=\"javascript:; \" class=\"gray-btn2\">取消</a>";
                }
                else
                {
                    this.Msg.InnerHtml = "";
                }
            }
            else
            {
                this.Msg.InnerHtml = "";
            }
            // isbate = OrderInfoType.rdoOrderAudit("订单支付返利是否启用", CompID).ToInt(0);
            //if (Fanli == 0)
            //{
            //    this.trbate.Visible = false;
            //    this.rebate.Visible = false;
            //}
            //商品是否启用库存
            IsInve = OrderInfoType.rdoOrderAudit("商品是否启用库存", this.CompID).ToInt(0);
            if (IsInve == 0)
            {
                strwhere.AppendFormat("and info.Inventory>0");
            }
            DataTable dt = SqlHelper.Query(SqlHelper.LocalSqlServer, SelectGoodsInfo.Returnsql(CompID.ToString(), DisID.ToString(), strwhere.ToString(), "1")).Tables[0];

            List <int> infoidl = new List <int>();

            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow item in dt.Rows)
                {
                    int id = item["ID"].ToString().ToInt(0);//BD_goodsInfo表的ID
                    infoidl.Add(id);
                }
            }

            //获取商品价格
            List <BLL.gDprice> l = BLL.Common.GetPrice(CompID, DisID, infoidl);

            if (l != null && l.Count > 0)
            {
                foreach (var item in l)
                {
                    DataRow[] dr = dt.Select(" ID=" + item.goodsInfoId);
                    if (dr.Length > 0)
                    {
                        //获取的价格大于促销价时、取促销价
                        dr[0]["pr"] = item.FinalPrice;
                        dr[0]["typeTinkerPrice"] = item.typePrice;
                        dr[0]["disTinkerPrice"]  = item.disPrice;
                        dr[0]["disProPr"]        = item.bpPrice;
                    }
                }
            }
            this.divGoodsName.InnerText = ConvertJson.ToJson2(dt);
            //代理商列表
            List <Hi.Model.BD_Distributor> list = new Hi.BLL.BD_Distributor().GetList("ID,DisName", "isnull(dr,0)=0 and compid=" + this.CompID, "");
            this.divDisList.InnerText = ConvertJson.ToJson(Common.FillDataTable(list));
            if (KeyID != 0)
            {
                if (Request.QueryString["type"] + "" != "2")
                {
                    Hi.Model.DIS_Order model = new Hi.BLL.DIS_Order().GetModel(KeyID);
                    //判断订单是否可以修改  企业下单订单已审未支付,代理商下单企业不能修改
                    if (model.OState > (int)Enums.OrderState.待审核)
                    {
                        JScript.AlertAndRedirect("订单已被其他人修改,请刷新后再重新操作!", "orderdetail.aspx?top=1&KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey));
                        return;
                    }
                }
                else
                {
                    this.hidType.Value = Request.QueryString["type"] + "";
                }
                Bind();
            }
            else
            {
                if ((Request.QueryString["type"] + "") == "1")
                {
                    this.hidType.Value = Request.QueryString["type"] + "";
                    ShopCart();
                }
            }
        }
    }