Ejemplo n.º 1
0
        protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            e.Row.Attributes.Add("style", "background:#FFF");
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                if (e.Row.RowIndex % 2 == 0)
                {
                    e.Row.Style.Add(HtmlTextWriterStyle.BackgroundColor, "#F4F4F4");
                }
                else
                {
                    e.Row.Style.Add(HtmlTextWriterStyle.BackgroundColor, "#FFFFFF");
                }

                string strPayModedId = gridView.DataKeys[e.Row.RowIndex].Values[0].ToString();
                if (strPayModedId.Length > 0 && strPayModedId != "0")
                {
                    Model.Pay.EnterprisePayFee payfeeModel = PayFreeBll.GetModel(int.Parse(lbEnterPid.Text), int.Parse(strPayModedId));
                    if (payfeeModel != null)
                    {
                        e.Row.Cells[2].Text = payfeeModel.FeeRate.ToString();
                        e.Row.Cells[3].Text = "<a href=\"PayFeeEdit.aspx?PayModelid=" + strPayModedId + "&Enterpid=" + lbEnterPid.Text + "&typeid=1\">设置费率</ a > ";
                    }
                    else
                    {
                        e.Row.Cells[2].Text = "<a href=\"PayFeeEdit.aspx?PayModelid=" + strPayModedId + "&Enterpid=" + lbEnterPid.Text + "&typeid=0\">设置费率</ a > ";
                        e.Row.Cells[3].Text = "";
                    }
                }
            }
        }
Ejemplo n.º 2
0
        //protected override int Act_PageLoad { get { return 196; } } //系统管理_是否显示用户管理

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if ((Request.Params["PayModelid"] != null) && (Request.Params["PayModelid"].ToString() != ""))
                {
                    lbPayModelid.Text = Request.Params["PayModelid"].Trim();
                    if (lbPayModelid.Text != "")
                    {
                        ShowInfoPayType(lbPayModelid.Text);
                    }
                }
                if ((Request.Params["Enterpid"] != null) && (Request.Params["Enterpid"].ToString() != ""))
                {
                    lbEnterPid.Text = Request.Params["Enterpid"].Trim();
                    if (lbEnterPid.Text != "")
                    {
                        ShowInfoEnter(lbEnterPid.Text);
                    }
                }
                //操作类型,新增通道 typeid是0,编辑通道费率 typeid是1,
                if ((Request.Params["typeid"] != null) && (Request.Params["typeid"].ToString() != ""))
                {
                    lbType.Text = Request.Params["typeid"].Trim();
                    if (lbType.Text == "1")
                    {
                        Model.Pay.EnterprisePayFee payfeeModel = PayFreeBll.GetModel(int.Parse(lbEnterPid.Text), int.Parse(lbPayModelid.Text));
                        txtPayFree.Text = payfeeModel.FeeRate.ToString();
                    }
                }
            }
        }