public void Sua_ThanhPham(MucThanhPham thPham)
        {
            var giaInSua = this.ThanhPhamS.Find(x => x.ID == thPham.ID);

            giaInSua.IdBaiIn         = thPham.IdBaiIn;
            giaInSua.KieuIn          = thPham.KieuIn;
            giaInSua.LoaiBangGia     = thPham.LoaiBangGia;
            giaInSua.SoTrangA4       = thPham.SoTrangA4;
            giaInSua.TenBangGiaChon  = thPham.TenBangGiaChon;
            giaInSua.TenToInDigiChon = thPham.TenToInDigiChon;
            giaInSua.TienIn          = thPham.TienIn;
        }
Example #2
0
 /*  public void Sua_ThanhPham(MucThanhPham thPham)
  * {
  *    var thPhamSua = this.ThanhPhamS.Find(x => x.ID == thPham.ID);
  *    thPhamSua.IdBaiIn = thPham.IdBaiIn;
  *    thPhamSua.DonViTinh = thPham.DonViTinh;
  *    thPhamSua.IdHangKhachHang = thPham.IdHangKhachHang;
  *    thPhamSua.LoaiThanhPham = thPham.LoaiThanhPham;
  *    thPhamSua.SoLuong = thPham.SoLuong;
  *    thPhamSua.TenThanhPham = thPham.TenThanhPham;
  *    thPhamSua.ThanhTien = thPham.ThanhTien;
  *    thPhamSua.TyLeMarkUp = thPham.TyLeMarkUp;
  *    if (thPham is MucThPhCanPhu)
  *    {
  *        var thPhamSuaN = (MucThPhCanPhu)thPhamSua;
  *        var thPhamN = (MucThPhCanPhu)thPham;
  *        //Điền thêm dữ liệu
  *        thPhamSuaN.SoMatCan = thPhamN.SoMatCan;
  *    }
  *    if (thPham is MucThPhCanGap)
  *    {
  *        var thPhamSuaN = (MucThPhCanGap)thPhamSua;
  *        var thPhamN = (MucThPhCanGap)thPham;
  *        //Điền thêm dữ liệu
  *        thPhamSuaN.SoDuongCan = thPhamN.SoDuongCan;
  *    }
  *    //Trường hợp thành phẩm khác
  *    if (thPham is MucThPhGiaCongNgoai)
  *    {
  *         var thPhamSuaN = (MucThPhGiaCongNgoai)thPhamSua;
  *        var thPhamN = (MucThPhGiaCongNgoai)thPham;
  *        //Điền dữ liệu
  *        thPhamSuaN.PhiGiaCong = thPhamN.PhiGiaCong;
  *        thPhamSuaN.PhiVanChuyen = thPhamN.PhiVanChuyen;
  *        thPhamSuaN.TenNhaCungCap = thPhamN.TenNhaCungCap;
  *    }
  *    if (thPham is MucDongCuonLoXo)
  *    {
  *        var thPhamSuaN = (MucDongCuonLoXo)thPhamSua;
  *        var thPhamN = (MucDongCuonLoXo)thPham;
  *        //Điền thêm dữ liệu
  *        thPhamSuaN.GayCao = thPhamN.GayCao;
  *        thPhamSuaN.GayDay = thPhamN.GayDay;
  *        thPhamSuaN.KieuDongCuon = thPhamN.KieuDongCuon;
  *        thPhamSuaN.IdLoXoChon = thPhamN.IdLoXoChon;
  *    }
  *    if (thPham is MucThPhEpKim)
  *    {
  *        var thPhamSuaN = (MucThPhEpKim)thPhamSua;
  *        var thPhamN = (MucThPhEpKim)thPham;
  *        //Điền thêm dữ liệu
  *        thPhamSuaN.KhoEpCao = thPhamN.KhoEpCao;
  *        thPhamSuaN.KhoEpRong = thPhamN.KhoEpRong;
  *        thPhamSuaN.LaEpViTinh = thPhamN.LaEpViTinh;
  *        thPhamSuaN.IdNhuEpKimChon = thPhamN.IdNhuEpKimChon;
  *    }
  *
  * }*/
 public void Xoa_ThanhPham(MucThanhPham thPham)
 {
     this.ThanhPhamS.Remove(thPham);
 }
Example #3
0
 public void Them_ThanhPham(MucThanhPham thPham)
 {
     this.ThanhPhamS.Add(thPham);
 }