示例#1
0
        private void BindData()
        {
            GlobalWebInfo appInfo = FacadeManage.aideTreasureFacade.GetGlobalWebInfo(IntParam);

            if (appInfo == null)
            {
                return;
            }

            if (appInfo.ProductType < 800)
            {
                DataSet ds = FacadeManage.aideTreasureFacade.GetGlobalCardQuota(appInfo.ProductType);
                ddlPrice.DataSource     = ds;
                ddlPrice.DataTextField  = "CardQuota";
                ddlPrice.DataValueField = "CardQuota";
                ddlPrice.DataBind();
                ddlPrice.Visible       = true;
                txtPrice.Visible       = false;
                ddlPrice.SelectedValue = Convert.ToInt32(appInfo.Price).ToString();
            }
            else
            {
                CtrlHelper.SetText(txtPrice, appInfo.Price.ToString());
            }
            ddlProductType.SelectedValue = appInfo.ProductType.ToString();
            CtrlHelper.SetText(txtSortID, appInfo.SortID.ToString());
            //CtrlHelper.SetText(txtAttachCurrency, appInfo.AttachCurrency.ToString());
            CtrlHelper.SetText(txtCurrency, appInfo.PresentCurrency.ToString());
            CtrlHelper.SetText(txtProductName, appInfo.ProductName);
        }
示例#2
0
        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
            GlobalWebInfo webInfo;

            if (IntParam <= 0)
            {
                webInfo = new GlobalWebInfo();
            }
            else
            {
                webInfo = FacadeManage.aideTreasureFacade.GetGlobalWebInfo(IntParam);
            }

            //webInfo.AttachCurrency = Convert.ToDecimal(CtrlHelper.GetText(txtAttachCurrency));
            webInfo.PresentCurrency = Convert.ToDecimal(CtrlHelper.GetText(txtCurrency));

            if (Convert.ToInt32(ddlProductType.SelectedValue) < 800)
            {
                webInfo.Price = Convert.ToDecimal(ddlPrice.SelectedValue);
            }
            else
            {
                webInfo.Price = Convert.ToDecimal(CtrlHelper.GetText(txtPrice));
            }

            webInfo.ProductName = CtrlHelper.GetText(txtProductName);
            webInfo.ProductType = Convert.ToInt32(ddlProductType.SelectedValue);
            webInfo.SortID      = CtrlHelper.GetInt(txtSortID, 0);

            if (IntParam <= 0)
            {
                FacadeManage.aideTreasureFacade.InsertGlobalPayConfig(webInfo);
                ShowInfo("新增成功", "PayConfigList.aspx", 1200);
            }
            else
            {
                FacadeManage.aideTreasureFacade.UpdateGlobalPayConfig(webInfo);
                ShowInfo("更新成功", "PayConfigList.aspx", 1200);
            }
        }
示例#3
0
 /// <summary>
 /// 修改充值配置
 /// </summary>
 /// <param name="config"></param>
 /// <returns></returns>
 public int UpdateGlobalPayConfig(GlobalWebInfo config)
 {
     return(aideTreasureData.UpdateGlobalPayConfig(config));
 }
示例#4
0
 /// <summary>
 /// 新增充值配置
 /// </summary>
 /// <param name="config"></param>
 /// <returns></returns>
 public int InsertGlobalPayConfig(GlobalWebInfo config)
 {
     return(aideTreasureData.InsertGlobalPayConfig(config));
 }