Example #1
0
 private void ShowInfo(int TypeId)
 {
     Maticsoft.Model.Shop.Products.ProductType model = new Maticsoft.BLL.Shop.Products.ProductType().GetModel(TypeId);
     this.lblTypeId.Text = model.TypeId.ToString();
     this.lblTypeName.Text = model.TypeName;
     this.lblRemark.Text = model.Remark;
 }
 public override void DataBind()
 {
     this.Items.Clear();
     Maticsoft.BLL.Shop.Products.ProductType type = new Maticsoft.BLL.Shop.Products.ProductType();
     foreach (Maticsoft.Model.Shop.Products.ProductType type2 in type.GetProductTypes())
     {
         base.Items.Add(new ListItem(type2.TypeName, type2.TypeId.ToString()));
     }
 }
 private void BindProductTypes()
 {
     DataSet list = new Maticsoft.BLL.Shop.Products.ProductType().GetList(string.Empty);
     if (!DataSetTools.DataSetIsNull(list))
     {
         this.dropProductTypes.DataSource = list;
         this.dropProductTypes.DataTextField = "TypeName";
         this.dropProductTypes.DataValueField = "TypeId";
         this.dropProductTypes.DataBind();
     }
 }
Example #4
0
 private void CreateTabs()
 {
     Maticsoft.BLL.Shop.Products.ProductType type = new Maticsoft.BLL.Shop.Products.ProductType();
     StringBuilder builder = new StringBuilder();
     int num = 1;
     foreach (Maticsoft.Model.Shop.Products.ProductType type2 in type.GetProductTypes())
     {
         builder.AppendFormat("<li class=\"normal\" onclick=\"nTabs(this,{0},{1});\"><a href=\"#\">{2}</a></li>", num, type2.TypeId, type2.TypeName);
         num++;
     }
     this.strLiList = builder.ToString();
 }
Example #5
0
 private void GetProductTypesKVList(HttpContext context)
 {
     JsonObject obj2 = new JsonObject();
     List<Maticsoft.Model.Shop.Products.ProductType> productTypes = new Maticsoft.BLL.Shop.Products.ProductType().GetProductTypes();
     JsonArray data = new JsonArray();
     productTypes.ForEach(delegate (Maticsoft.Model.Shop.Products.ProductType info) {
         data.Add(new JsonObject(new string[] { "TypeId", "TypeName" }, new object[] { info.TypeId, info.TypeName }));
     });
     obj2.Put("STATUS", "SUCCESS");
     obj2.Put("DATA", data);
     context.Response.Write(obj2.ToString());
 }
Example #6
0
 private void EditValue(HttpContext context)
 {
     JsonObject obj2 = new JsonObject();
     string str = context.Request.Form["ValueId"];
     if (!string.IsNullOrWhiteSpace(str))
     {
         long num = Convert.ToInt64(str);
         bool flag = new Maticsoft.BLL.Shop.Products.SKUItem().Exists(null, null, new long?(num));
         bool flag2 = new Maticsoft.BLL.Shop.Products.ProductAttribute().Exists(null, null, new long?(num));
         if (flag || flag2)
         {
             obj2.Put("STATUS", "FAILED");
         }
         else
         {
             Maticsoft.BLL.Shop.Products.ProductType type = new Maticsoft.BLL.Shop.Products.ProductType();
             if (type.DeleteManage(null, null, new long?(num)))
             {
                 obj2.Put("STATUS", "SUCCESS");
             }
             else
             {
                 obj2.Put("STATUS", "FAILED");
             }
         }
     }
     else
     {
         obj2.Put("STATUS", "FAILED");
     }
     context.Response.Write(obj2.ToString());
 }
Example #7
0
 protected void gridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     ProductType type = new ProductType();
     int num = (int) this.gridView.DataKeys[e.RowIndex].Value;
     type.DeleteManage(new int?(num), null, null);
     this.gridView.OnBind();
 }