Пример #1
0
 protected override void OnLoad(EventArgs e)
 {
     grid = new Framwork.GirdControl <Entities.ProductParameter>(this);
     grid.AddTextBoxColumn(p => p.Title, "عنوان");
     grid.AddTextBoxColumn(p => p.Key, "کلید");
     grid.SetDataSource(paramsRepo.GetAll(ParentCategoryId));
     base.OnLoad(e);
 }
Пример #2
0
 public void AddParameter(int ProductCategoryId)
 {
     if (Entity.ProductCategoryId > 0)
     {
         var param = paramsRepo.GetAll(Entity.ProductCategoryId);
         var value = Pvalue.GetAll(Entity.ProductId);
         foreach (var item in param)
         {
             var txt = TextBox(item.Title, "param");
             Entities.ProductParameterValue data = value.FirstOrDefault(p => p.ProductParameterId == item.ProductParameterId & p.ProductId == Entity.ProductId);
             if (data != default(Entities.ProductParameterValue))
             {
                 txt.Text = data.Value;
             }
             parameterControls.Add(item, txt);
         }
     }
 }