public decimal PhiInDigi() { var kq = 0m; if (View.TongSoToChayDigi <= 0) { return(kq); } var mayIn = ToInMayDigi.DocTheoId(View.IdMayInDiGiChon); var duLieuTinhGia = new DuLieuTinhGiaInNhanhTheoMay() { BHR = mayIn.BHR, ClickTrangA4 = mayIn.ClickA4BonMau, DayLoiNhuan = mayIn.DayLoiNhuan, DaySoLuong = mayIn.DaySoLuong, InTuTro = mayIn.InTuTro, PhiPhePhamSanSang = mayIn.PhiPhePhamSanSang, ThoiGianSanSang = mayIn.ThoiGianSanSang, TocDo = mayIn.TocDo }; var giaIn = new GiaInNhanhTheoMay(duLieuTinhGia, this.SoTrangA4Digi(), 0); kq = giaIn.ChiPhi(this.SoTrangA4Digi()); return(kq); }
public void TrinhBayChiTietMayIn() { if (View.ID <= 0) { return; } var toInMayDigi = ToInMayDigi.DocTheoId(View.ID); View.ID = toInMayDigi.ID; View.Ten = toInMayDigi.Ten; View.Rong = toInMayDigi.Rong; View.Cao = toInMayDigi.Cao; View.VungInRong = toInMayDigi.VungInRong; View.VungInCao = toInMayDigi.VungInCao; View.TocDo = toInMayDigi.TocDo; View.IdMayInDigi = toInMayDigi.IdMayIn; View.KhoToChayCoTheIn = toInMayDigi.KhoToChayCoTheIn; View.QuiSoTrangA4 = toInMayDigi.QuiA4; View.DaySoLuongCoBan = toInMayDigi.DaySoLuong; View.DayLoiNhuanCoBan = toInMayDigi.DayLoiNhuan; View.DaySoLuongNiemYet = toInMayDigi.DaySoLuongNiemYet; View.ThuTu = toInMayDigi.ThuTu; View.HPIndigo = toInMayDigi.LaHPIndigo; View.InTuTro = toInMayDigi.InTuTro; View.KhongSuDung = toInMayDigi.KhongSuDung; }
public void TrinhBayDuLieuInNhanhChon() { var bangGiaInNhanh = ToInMayDigi.DocTheoId(View.IdToInDigiChon); View.DaySoluong = bangGiaInNhanh.DaySoLuongNiemYet; View.DonViTinh = "Trang A4"; }
public int SoTrangA4() { var toChayDigi = ToInMayDigi.DocTheoId(View.IdMayInOrToIn); int result = 0; result = View.SoToChay * toChayDigi.QuiA4 * View.SoMatIn; return(result); }
public string LuuDaySoLuong() { var mg = ""; var bangGia = ToInMayDigi.DocTheoId(View.IdToInDigiChon); bangGia.DaySoLuongNiemYet = View.DaySoluong; ToInMayDigi.Sua(ref mg, bangGia); return(mg); }
public string TenToInDigiChon() { var kq = ""; if (View.IdMayInOrToIn > 0) { kq = ToInMayDigi.DocTheoId(View.IdMayInOrToIn).Ten; } return(kq); }
public void CapNhatKhoToChayDigi() { if (View.IdMayInDiGiChon <= 0) { return; } var mayIn = ToInMayDigi.DocTheoId(View.IdMayInDiGiChon); View.ToChayRongDigi = mayIn.Rong; View.ToChayCaoDigi = mayIn.Cao; View.SoToChayBuHaoDigi = 1; }
private decimal GiaInNhanhTheoSLuong(int soLuong) { decimal ketQua = 0; var toInDiGi = ToInMayDigi.DocTheoId(View.IdToInDigiChon); var duLieuDeTinh = new DuLieuTinhGiaInNhanhTheoMay(); duLieuDeTinh.TocDo = toInDiGi.TocDo * toInDiGi.QuiA4; //Quan trọng qui A4 duLieuDeTinh.InTuTro = toInDiGi.InTuTro; duLieuDeTinh.ClickTrangA4 = toInDiGi.ClickA4BonMau; //Chọn 4 màu duLieuDeTinh.BHR = toInDiGi.BHR; duLieuDeTinh.PhiPhePhamSanSang = toInDiGi.PhiPhePhamSanSang; duLieuDeTinh.ThoiGianSanSang = toInDiGi.ThoiGianSanSang; duLieuDeTinh.DaySoLuong = toInDiGi.DaySoLuong; duLieuDeTinh.DayLoiNhuan = toInDiGi.DayLoiNhuan; ketQua = new GiaInNhanhTheoMay(duLieuDeTinh, soLuong, TyLeMarkUpTheoHangKH()).ThanhTienSales(); return(ketQua); }
private int SoTrangA4Digi() { var kq = 0; if (View.SoLuongSP <= 0 || View.TongSoToChayDigi <= 0) { return(0); } var soMat = 1; if (View.KieuInDigi == MotHaiMat.HaiMat) { soMat = 2; } var mayIn = ToInMayDigi.DocTheoId(View.IdMayInDiGiChon); kq = mayIn.QuiA4 * View.TongSoToChayDigi * soMat; return(kq); }