コード例 #1
0
ファイル: AgentPayFeeEdit.aspx.cs プロジェクト: dmhai/ColoPay
        //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["AgentId"] != null) && (Request.Params["AgentId"].ToString() != ""))
                {
                    lbAgentId.Text = Request.Params["AgentId"].Trim();
                    if (lbAgentId.Text != "")
                    {
                        ShowInfoEnter(lbAgentId.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.AgentPayFee payfeeModel = PayFreeBll.GetModel(int.Parse(lbAgentId.Text), int.Parse(lbPayModelid.Text));
                        txtPayFree.Text = payfeeModel.FeeRate.ToString();
                    }
                }
            }
        }
コード例 #2
0
ファイル: PayFeeList.aspx.cs プロジェクト: dmhai/ColoPay
 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.AgentPayFee payfeeModel = PayFreeBll.GetModel(int.Parse(lbAgentIDPid.Text), int.Parse(strPayModedId));
             if (payfeeModel != null)
             {
                 e.Row.Cells[2].Text = payfeeModel.FeeRate.ToString();
             }
             else
             {
                 e.Row.Cells[2].Text = "通道已关闭";
             }
         }
     }
 }