private void TinhThu_CatDecal() { var idHangKH = int.Parse(cboHangKH.SelectedValue.ToString()); var thongTinBanDau = new ThongTinBanDauThanhPham(); thongTinBanDau.DonViTinh = "Con"; thongTinBanDau.TinhTrangForm = FormStateS.View; thongTinBanDau.TieuDeForm = "Cắt decal [Tính thử]"; //Tạo mục đóng cuốn var mucThPhCatDecal = new MucThPhCatDecal(); mucThPhCatDecal.IdBaiIn = 1; mucThPhCatDecal.IdHangKhachHang = this.IdHangKhachHang; mucThPhCatDecal.SoLuong = 100; //Vì số lượng có thể không trùng mucThPhCatDecal.DonViTinh = "con"; mucThPhCatDecal.ConRong = 5; mucThPhCatDecal.ConCao = 5; mucThPhCatDecal.LoaiThanhPham = LoaiThanhPhamS.CatDecal; var frm = new ThPhCatDecalForm(thongTinBanDau, mucThPhCatDecal); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; //Data gởi qua form frm.ShowDialog(); }
private void TinhThuBoiBiaCung() { var idHangKH = int.Parse(cboHangKH.SelectedValue.ToString()); var thongTinBanDauMP = new ThongTinBanDauThanhPham(); thongTinBanDauMP.MoTextSoLuong = true; thongTinBanDauMP.TinhTrangForm = FormStateS.View; thongTinBanDauMP.TieuDeForm = "Bồi bìa cứng [Tính thử]"; //Tạo mục đóng cuốn var mucThPhBoiBC = new MucThPhBoiBiaCung(); mucThPhBoiBC.IdBaiIn = 1; mucThPhBoiBC.IdHangKhachHang = this.IdHangKhachHang; mucThPhBoiBC.SoLuong = 1; //Vì số lượng có thể không trùng mucThPhBoiBC.DonViTinh = "Tấm"; mucThPhBoiBC.TamRong = 10; mucThPhBoiBC.TamCao = 10; mucThPhBoiBC.SoToBoiTrenTamBia = 1; mucThPhBoiBC.LoaiThanhPham = LoaiThanhPhamS.BoiBiaCung; var frm = new ThPhBoiBiaCungForm(thongTinBanDauMP, mucThPhBoiBC); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; //Data gởi qua form frm.ShowDialog(); }
public ThPhDongCuonForm(ThongTinBanDauThanhPham thongTinBanDau, MucDongCuon mucThPham) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.Text = thongTinBanDau.TieuDeForm; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; //Mở đóng số lượng this.MoTextSoLuong = thongTinBanDau.MoTextSoLuong; dongCuonPres = new ThPhDongCuonPresenter(this, mucThPham); //dongCuonPres.KhoiTaoBanDau(); LoadThanhPham(); //Bẫy lbxThanhPham.SelectedIndex = -1; lbxThanhPham.SelectedIndex = 0; //Xử lý Id tp chọn ở đây if (this.TinhTrangForm == FormStateS.Edit || this.IdThanhPhamChon > 0) { this.IdThanhPhamChon = mucThPham.IdThanhPhamChon; } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); lbxThanhPham.SelectedIndexChanged += new EventHandler(ListBoxes_SelectedIndex_Changed); }
public ThPhCanGapForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhCanGap mucThPham) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; canGapPres = new ThPhCanGapPresenter(this, mucThPham); LoadThanhPham(); //Bẩy lbxThanhPham.SelectedIndex = -1; lbxThanhPham.SelectedIndex = 0; //Xử lý ở đây vì trong present không thể if (this.TinhTrangForm == FormStateS.Edit) { this.IdThanhPhamChon = mucThPham.IdThanhPhamChon; } if (this.TinhTrangForm == FormStateS.New) { canGapPres.KhoiTaoBanDau(); } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoDuongCan.TextChanged += new EventHandler(TextBoxes_TextChanged); lbxThanhPham.SelectedIndexChanged += new EventHandler(ListBoxes_SelectedIndex_Changed); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtSoDuongCan.KeyPress += new KeyPressEventHandler(InputValidator); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtSoDuongCan.Leave += new EventHandler(TextBoxes_Leave); }
public ThPhGiaCongNgoaiForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhGiaCongNgoai mucThPhGiaCongNgoai = null) { InitializeComponent(); this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; this.LoaiThPh = thongTinBanDau.LoaiThanhPham; this.DonViTinh = thongTinBanDau.DonViTinh; this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; //Tiếp theo thPhamGCongNgoaiPres = new ThPhGiaCongNgoaiPresenter(this, mucThPhGiaCongNgoai); if (this.TinhTrangForm == FormStateS.New) { thPhamGCongNgoaiPres.KhoiTaoBanDau(); } //Event txtTen.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtDonViTinh.TextChanged += new EventHandler(TextBoxes_TextChanged); txtTenNhaCungCap.TextChanged += new EventHandler(TextBoxes_TextChanged); txtPhiGiaCong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtPhiVanChuyen.TextChanged += new EventHandler(TextBoxes_TextChanged); txtTenNhaCungCap.TextChanged += new EventHandler(TextBoxes_TextChanged); spnTyLeLoiNhuan.ValueChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtPhiGiaCong.KeyPress += new KeyPressEventHandler(InputValidator); txtPhiVanChuyen.KeyPress += new KeyPressEventHandler(InputValidator); }
private ThongTinBanDauThanhPham ThongTinBanDauCuonKeo() { var thongTinBanDau = new ThongTinBanDauThanhPham { IdBaiIn = this.ID, IdHangKhachHang = this.IdHangKhachHang, ThongDiepCanThiet = string.Format("Số lượng {0} {1}", this.SoCuon, "cuốn") }; return(thongTinBanDau); }
public ThPhKhoanBoGocForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhKhoanBoGoc mucThPhKHoanBoGoc) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; //txtSoLuongBlock.Enabled = thongTinBanDau.MoTextSoLuong; thPhKhoanBoGocPres = new ThPhKhoanBoGocPresenter(this, mucThPhKHoanBoGoc); LoadMayMoc(); //Load //Mục này phải làm ở đây if (this.TinhTrangForm == FormStateS.Edit || this.IdThanhPhamChon > 0) { this.IdThanhPhamChon = mucThPhKHoanBoGoc.IdThanhPhamChon; //this.IdGiayBoiGiuaChon = mucThPhBoiBiaCung.IdGiayBoiGiuaChon; } //Tiếp xem nếu có giấy bồi khong if (this.TinhTrangForm == FormStateS.Edit) { //Tính toán CapNhatLabelGia(true); } //Events txtSoLuongBlock.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLanKhoanBoTrenBlock.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuongBlock.Leave += new EventHandler(TextBoxes_Leave); txtSoLanKhoanBoTrenBlock.Leave += new EventHandler(TextBoxes_Leave); txtKichThuocBlock.Leave += new EventHandler(TextBoxes_Leave); txtSoLuongBlock.Leave += new EventHandler(TextBoxes_Leave); txtSoLuongBlock.KeyPress += new KeyPressEventHandler(InputValidator); txtSoLanKhoanBoTrenBlock.KeyPress += new KeyPressEventHandler(InputValidator); txtKichThuocBlock.KeyPress += new KeyPressEventHandler(InputValidator); txtSoLuongBlock.KeyPress += new KeyPressEventHandler(InputValidator); cboMayMoc.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(DropDownList_SelectedIndexChanged); }
public ThPhBoiBiaCungForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhBoiBiaCung mucThBoiBiaCung) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; txtSoLuong.Enabled = thongTinBanDau.MoTextSoLuong; thPhMoPhangPres = new ThPhBoiBiaCungPresenter(this, mucThBoiBiaCung); LoadDongCuon(); cboMayBoi.SelectedIndex = -1; cboMayBoi.SelectedIndex = 0; //Load Nhu ep LoadToBoi(); //Load //Mục này phải làm ở đây if (this.TinhTrangForm == FormStateS.Edit || this.IdThanhPhamChon > 0) { this.IdThanhPhamChon = mucThBoiBiaCung.IdThanhPhamChon; this.IdToBoiChon = mucThBoiBiaCung.IdToBoiChon; } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoToBoiTrenTamBia.TextChanged += new EventHandler(TextBoxes_TextChanged); txtTamRong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtTamCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtSoToBoiTrenTamBia.Leave += new EventHandler(TextBoxes_Leave); txtTamRong.Leave += new EventHandler(TextBoxes_Leave); txtTamCao.Leave += new EventHandler(TextBoxes_Leave); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtSoToBoiTrenTamBia.KeyPress += new KeyPressEventHandler(InputValidator); txtTamRong.KeyPress += new KeyPressEventHandler(InputValidator); txtTamCao.KeyPress += new KeyPressEventHandler(InputValidator); lstToBoi.SelectedItemChanged += new EventHandler(ListView_SelectedItemChanged); cboMayBoi.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(DropDownList_SelectedIndexChanged); }
public ThPhBeForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhBe mucThPhamDongCuon) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; thPhamBePres = new ThPhBePresenter(this, mucThPhamDongCuon); LoadMayBe(); cboMayBe.SelectedIndex = -1; cboMayBe.SelectedIndex = 0; //Load Nhu ep LoadKhuonBe(); //Load //Mục này phải làm ở đây if (this.TinhTrangForm == FormStateS.Edit || this.IdThanhPhamChon > 0) { this.IdThanhPhamChon = mucThPhamDongCuon.IdThanhPhamChon; this.IdKhuonBeChon = mucThPhamDongCuon.IdKhuonBeChon; } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtKhoBeCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtKhoBeRong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtKhoBeCao.TextChanged += new EventHandler(TextBoxes_Leave); txtKhoBeRong.TextChanged += new EventHandler(TextBoxes_Leave); lstKhuonBe.SelectedItemChanged += new EventHandler(ListView_SelectedItemChanged); cboMayBe.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(DropDownList_SelectedIndexChanged); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtKhoBeCao.KeyPress += new KeyPressEventHandler(InputValidator); txtKhoBeRong.KeyPress += new KeyPressEventHandler(InputValidator); }
private ThongTinBanDauThanhPham thongTinBanDauChoThPh(int idHangKH, LoaiThanhPhamS loaiThPham, FormStateS tinhTrangForm, string tieuDeForm, string donViTinh) { var thongTinBanDau = new ThongTinBanDauThanhPham { IdBaiIn = 1, IdHangKhachHang = idHangKH, LoaiThanhPham = loaiThPham, DonViTinh = donViTinh, SoLuongSanPham = 50, TieuDeForm = tieuDeForm, SoLuongToChay = 1, TinhTrangForm = tinhTrangForm, ThongDiepCanThiet = "Tính thử:" + '\n' + '\r', }; return(thongTinBanDau); }
public ThPhCatDecalForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhCatDecal mucThPhCatDecal) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; //txtSoLuong.Enabled = thPhMoPhangPres = new ThPhCatDecalPresenter(this, mucThPhCatDecal); LoadMayThanhPham(); cboMayThPh.SelectedIndex = -1; cboMayThPh.SelectedIndex = 0; //Load Nhu ep //Load //Mục này phải làm ở đây if (this.TinhTrangForm == FormStateS.Edit || this.IdThanhPhamChon > 0) { this.IdThanhPhamChon = mucThPhCatDecal.IdThanhPhamChon; } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtConRong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtConCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtConRong.KeyPress += new KeyPressEventHandler(InputValidator); txtConCao.KeyPress += new KeyPressEventHandler(InputValidator); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtConRong.Leave += new EventHandler(TextBoxes_Leave); txtConCao.Leave += new EventHandler(TextBoxes_Leave); cboMayThPh.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(DropDownList_SelectedIndexChanged); }
private void ShowFormEpKim() { var thongTinBanDau = new ThongTinBanDauThanhPham { IdBaiIn = 1, IdHangKhachHang = this.IdHangKHChon, LoaiThanhPham = LoaiThanhPhamS.EpKim, DonViTinh = "Con", SoLuongSanPham = 50, TieuDeForm = "Ép kim [Tính thử]", SoLuongToChay = 0, TinhTrangForm = FormStateS.View, ThongDiepCanThiet = "Chỉ tính toán thử" }; //muc emkim var mucThPhEpKim = new MucThPhEpKim(); mucThPhEpKim.IdBaiIn = 1; mucThPhEpKim.IdHangKhachHang = this.IdHangKHChon; mucThPhEpKim.LoaiThanhPham = LoaiThanhPhamS.EpKim; mucThPhEpKim.SoLuong = 100; //Tạm mucThPhEpKim.DonViTinh = "con"; mucThPhEpKim.KhoEpRong = 5f; mucThPhEpKim.KhoEpCao = 5f; var frm = new ThPhEpKimForm(thongTinBanDau, mucThPhEpKim); frm.TinhTrangForm = (int)FormStateS.View; frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; //Data gởi qua form frm.ShowDialog(); }
public ThPhCanPhuForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhCanPhu mucThPhCanPhu) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; txtSoLuong.Enabled = thongTinBanDau.MoTextSoLuong;//Bật hay tắt số lượng //Tiép canPhuPres = new ThPhCanPhuPresenter(this, mucThPhCanPhu); LoadThanhPham(); lbxCanPhu.SelectedIndex = -1; lbxCanPhu.SelectedIndex = 0; //Phải xử lý mục chọn tại đây if (this.TinhTrangForm == FormStateS.Edit) { this.IdThanhPhamChon = mucThPhCanPhu.IdThanhPhamChon; } if (this.TinhTrangForm == FormStateS.New)//Chỉ khi mới { canPhuPres.KhoiTaoBanDau(); } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); rdbHaiMat.CheckedChanged += new EventHandler(TextBoxes_TextChanged); rdbMotMat.CheckedChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); lbxCanPhu.SelectedIndexChanged += new EventHandler(ListBoxes_SelectedIndex_Changed); }
public ThPhEpKimForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhEpKim mucThPham) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; epKimPres = new ThPhEpKimPresenter(this, mucThPham); //Load LoadEpKim(); cboEpKim.SelectedIndex = -1; cboEpKim.SelectedIndex = 0; //Phải làm ở dây if (this.TinhTrangForm == FormStateS.Edit) { this.IdThanhPhamChon = mucThPham.IdThanhPhamChon; this.IdNhuEpKimChon = mucThPham.IdNhuEpKimChon; } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); lstNhuEpKim.SelectedIndexChanged += new EventHandler(TextBoxes_TextChanged); txtCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtRong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtCao.Leave += new EventHandler(TextBoxes_Leave); txtRong.Leave += new EventHandler(TextBoxes_Leave); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtCao.KeyPress += new KeyPressEventHandler(InputValidator); txtRong.KeyPress += new KeyPressEventHandler(InputValidator); }
public ThPhBoiNhieuLopForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhBoiNhieuLop mucThPhBoiBiaCung) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; txtSoLuong.Enabled = thongTinBanDau.MoTextSoLuong; thPhBoiNhieuLopPres = new ThPhBoiNhieuLopPresenter(this, mucThPhBoiBiaCung); LoadMayBoi(); //Load Nhu ep //Load //Mục này phải làm ở đây if (this.TinhTrangForm == FormStateS.Edit || this.IdThanhPhamChon > 0) { this.IdThanhPhamChon = mucThPhBoiBiaCung.IdThanhPhamChon; //this.IdGiayBoiGiuaChon = mucThPhBoiBiaCung.IdGiayBoiGiuaChon; } //Tiếp xem nếu có giấy bồi khong if (this.TinhTrangForm == FormStateS.Edit) { //Cập nhật thông tin giấy bồi: if (this.GiayDeBoiChon != null) { txtThongTinGiayLot.Lines = this.GiayDeBoiChon.ThongTinGiayBoi().ToArray(); } //Tính toán CapNhatLabelGia(); } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLopLot.TextChanged += new EventHandler(TextBoxes_TextChanged); txtToBoiRong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtToBoiCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtSoLopLot.Leave += new EventHandler(TextBoxes_Leave); txtToBoiRong.Leave += new EventHandler(TextBoxes_Leave); txtToBoiCao.Leave += new EventHandler(TextBoxes_Leave); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtSoLopLot.KeyPress += new KeyPressEventHandler(InputValidator); txtToBoiRong.KeyPress += new KeyPressEventHandler(InputValidator); txtToBoiCao.KeyPress += new KeyPressEventHandler(InputValidator); rdbBoiDap.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(RadioButtons_ToggleStateChanged); rdbBoiLotGiua.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(RadioButtons_ToggleStateChanged); cboMayBoi.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(DropDownList_SelectedIndexChanged); }