protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         List <Model.Client> list = new BLL.Client().GetList();
         ddlGroupId.DataSource     = list;
         ddlGroupId.DataTextField  = "ClientName";
         ddlGroupId.DataValueField = "ClientID";
         ddlGroupId.DataBind();
         if (Request.QueryString["GoodCategoryID"] != null)
         {
             txtGoodCategoryName.ReadOnly = true;
             txtGoodCategoryName.Attributes.Remove("ajaxurl");
             BLL.GoodCategory   bll   = new BLL.GoodCategory();
             Model.GoodCategory model = new Model.GoodCategory();
             model = bll.GetModel(Request.QueryString["GoodCategoryID"]);
             txtGoodCategoryName.Text = model.GoodCategoryName;
             //txtGoodBarCode.Text = model.GoodBarCode.ToString();
             //txtGoodBarCode.Text = model.GoodBarCode.ToString();
             txtBrokerageRatio.Text = model.BrokerageRatio.ToString();
             txtIntegralRatio.Text  = model.IntegralRatio.ToString();
             //txtStandard.Text = model.Standard.ToString();
             drpState.SelectedValue = model.State.ToString();
             txtRemark.Text         = model.Remark;
         }
     }
 }
Example #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string id = context.Request.QueryString["id"];

            Model.GoodCategory model = null;
            BLL.GoodCategory   bll   = new BLL.GoodCategory();
            try
            {
                model = bll.GetModel(id);
                if (model != null)
                {
                    context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(model));
                }
            }
            catch (Exception)
            {}
        }