Example #1
0
 private void ShowInfo(int SalesType, int ProductId, int RuleType)
 {
     NoName.NetShop.BLL.SalesInfoModelBll bll   = new NoName.NetShop.BLL.SalesInfoModelBll();
     NoName.NetShop.Model.SalesInfoModel  model = bll.GetModel(SalesType, ProductId, RuleType);
     this.lblSalesType.Text = model.SalesType.ToString();
     this.lblProductId.Text = model.ProductId.ToString();
     this.lblRuleType.Text  = model.RuleType.ToString();
     this.txtSortValue.Text = model.SortValue.ToString();
 }
 private void ShowInfo(int SalesType,int ProductId,int RuleType)
 {
     NoName.NetShop.BLL.SalesInfoModelBll bll=new NoName.NetShop.BLL.SalesInfoModelBll();
     NoName.NetShop.Model.SalesInfoModel model=bll.GetModel(SalesType,ProductId,RuleType);
     this.lblSalesType.Text=model.SalesType.ToString();
     this.lblProductId.Text=model.ProductId.ToString();
     this.lblRuleType.Text=model.RuleType.ToString();
     this.txtSortValue.Text=model.SortValue.ToString();
 }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsNumber(txtSortValue.Text))
            {
            strErr+="SortValue�������֣�\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            int SortValue=int.Parse(this.txtSortValue.Text);

            NoName.NetShop.Model.SalesInfoModel model=new NoName.NetShop.Model.SalesInfoModel();
            model.SortValue=SortValue;

            NoName.NetShop.BLL.SalesInfoModelBll bll=new NoName.NetShop.BLL.SalesInfoModelBll();
            bll.Update(model);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtSortValue.Text))
            {
                strErr += "SortValue不是数字!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int SortValue = int.Parse(this.txtSortValue.Text);

            NoName.NetShop.Model.SalesInfoModel model = new NoName.NetShop.Model.SalesInfoModel();
            model.SortValue = SortValue;

            NoName.NetShop.BLL.SalesInfoModelBll bll = new NoName.NetShop.BLL.SalesInfoModelBll();
            bll.Add(model);
        }