コード例 #1
0
 public SpecificationView(Specification spec)
 {
     this.Id = spec.Id;
     this.Barcode = spec.Barcode;
     if (spec.Unit != null)
     {
         this.UnitId = spec.Unit.Id;
     }
     this.UnitPrice = spec.UnitPrice;
     this.SpecifiText = spec.SpecifiText;
 }
コード例 #2
0
 public ProductView(Specification spec)
 {
     this.ProductId = spec.Product.Id;
     this.ProductName = spec.Product.ProductName;
     this.ProductNumber = spec.Product.ProductNumber;
     this.Category = spec.Product.Category.CategoryName;
     this.TaxRate = spec.Product.TaxRate;
     this.Barcode = spec.Barcode ;
     this.Unit = spec.Unit.DicName;
     this.UnitPrice = spec.UnitPrice;
     this.SpecifiText = spec.SpecifiText;
 }
コード例 #3
0
 public SpecificationView Translate(Specification spec)
 {
     SpecificationView view = new SpecificationView(spec);
     return view;
 }
コード例 #4
0
 public Specification Translate(SpecificationView view)
 {
     Specification spec = new Specification();
     spec.Id = view.Id;
     spec.UnitPrice = view.UnitPrice;
     spec.SpecifiText = view.SpecifiText;
     spec.Barcode = view.Barcode;
     spec.Unit = UnitDao.Get(view.UnitId);
     spec.IsDel = view.IsDel;
     return spec;
 }
コード例 #5
0
        public void SaveOrUpdateSpecification(Specification spec)
        {
            try
            {
                NHinbernateSessionFactory.OpenSession();
                SpecificationDao.SaveOrUpdate(spec);

            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                NHinbernateSessionFactory.Commit();
            }
        }
コード例 #6
0
 private void AsoSearchProductPanelShowSpec(Specification spec)
 {
     if (spec == null)
     {
         return;
     }
     this.AsoStorageOutSpeciText.SelectedValue = spec.Id;
     AsoStorageOutUnit.Text = spec.Unit.DicName;
     AsoStorageOutBarcode.Text = spec.Barcode;
     AsoStorageOutUnitPrice.Text = spec.UnitPrice.ToString();
     if (string.IsNullOrEmpty(AsoStorageOutAmount.Text))
     {
         AsoStorageOutAmount.Text = "1";
     }
 }
コード例 #7
0
 private void AsoSearchProductPanelShowProduct(Specification spec)
 {
     if (spec == null)
     {
         return;
     }
     this.AsoStorageOutBarcode.Tag = spec;
     AsoStorageOutProductName.Text = spec.Product.ProductName;
     AsoStorageOutProductNumber.Text = spec.Product.ProductNumber;
     this.AsoStorageOutSpeciText.DataSource = spec.Product.SpecList;
     AsoStorageOutSpeciText.DisplayMember = "SpecifiText";
     AsoStorageOutSpeciText.ValueMember = "Id";
     AsoSearchProductPanelShowSpec(spec);
     AsoStorageOutSpeciText.Enabled = false;
 }
コード例 #8
0
 private void UsSearchProductPanelShowSpec(Specification spec)
 {
     if (spec == null)
     {
         return;
     }
     this.UsSearchSpeciText .SelectedValue = spec.Id;
     UsSearchUnit.Text = spec.Unit.DicName;
     UsSearchBarcode.Text = spec.Barcode;
     UsSearchUnitPrice.Text = spec.UnitPrice.ToString();
     if (string.IsNullOrEmpty(UsSearchAmount.Text))
     {
         UsSearchAmount.Text = "1";
     }
 }
コード例 #9
0
 private void UsSearchProductPanelShowProduct(Specification spec)
 {
     if (spec == null)
     {
         return;
     }
     UsSearchBarcode.Tag = spec;
     UsSearchProductName.Text = spec.Product.ProductName;
     UsSearchProductNumber.Text = spec.Product.ProductNumber;
     UsSearchSpeciText.DataSource = spec.Product.SpecList;
     UsSearchSpeciText.DisplayMember = "SpecifiText";
     UsSearchSpeciText.ValueMember = "Id";
     UsSearchProductPanelShowSpec(spec);
     UsSearchSpeciText.Enabled = false;
 }