private void btnTinhThu_DongCuonMoPhang_Click(object sender, EventArgs e) { var idHangKH = int.Parse(cboHangKH.SelectedValue.ToString()); var thongTinBanDauMP = new ThongTinBanDauDongCuon(); thongTinBanDauMP.MoTextSoLuongCuon = true; thongTinBanDauMP.TinhTrangForm = FormStateS.View; thongTinBanDauMP.TieuDeForm = "Đóng cuốn Mở phẳng [Tính thử]"; //Tạo mục đóng cuốn var mucDongCuonMP = new MucDongCuonMoPhang(); mucDongCuonMP.IdBaiIn = 1; mucDongCuonMP.IdHangKhachHang = this.IdHangKhachHang; mucDongCuonMP.SoLuong = 1; //Vì số lượng có thể không trùng mucDongCuonMP.DonViTinh = "cuốn"; mucDongCuonMP.SoToDoi = 10; mucDongCuonMP.LoaiThanhPham = LoaiThanhPhamS.DongCuon; mucDongCuonMP.KieuDongCuon = KieuDongCuonS.MoPhang; var frm = new ThPhDongCuonMoPhangForm(thongTinBanDauMP, mucDongCuonMP); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; //Data gởi qua form frm.ShowDialog(); }
private void btnTinhThu_GiaDongCuonLoXo_Click(object sender, EventArgs e) { var idHangKH = int.Parse(cboHangKH.SelectedValue.ToString()); var thongTinBanDauLX = new ThongTinBanDauDongCuon(); thongTinBanDauLX.TinhTrangForm = FormStateS.View; thongTinBanDauLX.TieuDeForm = "Đóng cuốn [Tính thử]"; thongTinBanDauLX.MoTextSoLuongCuon = true; //Tạo mục đóng cuốn var mucDongCuonLX = new MucDongCuonLoXo(); mucDongCuonLX.IdBaiIn = 1; mucDongCuonLX.IdHangKhachHang = this.IdHangKhachHang; mucDongCuonLX.SoLuong = 1; //Vì số lượng có thể không trùng mucDongCuonLX.DonViTinh = "cuốn"; mucDongCuonLX.GayCao = 10; mucDongCuonLX.GayDay = 0.5f; mucDongCuonLX.LoaiThanhPham = LoaiThanhPhamS.DongCuon; mucDongCuonLX.KieuDongCuon = KieuDongCuonS.LoXo; var frm = new ThPhDongCuonLoXoForm(thongTinBanDauLX, mucDongCuonLX); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; //Data gởi qua form frm.ShowDialog(); }
private ThongTinBanDauDongCuon ThongTinBanDauCuonMoPhang() { var thongTinBanDau = new ThongTinBanDauDongCuon { ThongDiepCanThiet = string.Format("Số lượng {0} {1}", this.SoCuon, "cuốn"), MoTextSoLuongCuon = false }; return(thongTinBanDau); }
public ThPhDongCuonLoXoForm(ThongTinBanDauDongCuon thongTinBanDau, MucDongCuonLoXo mucThPhamDongCuon) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.Text = thongTinBanDau.TieuDeForm; txtSoLuong.Enabled = thongTinBanDau.MoTextSoLuongCuon; thPhLoXoPres = new ThPhDongCuonLoXoPresenter(this, mucThPhamDongCuon); LoadDongCuonLoXo(); cboMayLoXo.SelectedIndex = -1; cboMayLoXo.SelectedIndex = 0; //Load Nhu ep LoadLoXoDongCuon(); //Load //Mục này phải làm ở đây if (this.TinhTrangForm == FormStateS.Edit || this.IdThanhPhamChon > 0) { this.IdThanhPhamChon = mucThPhamDongCuon.IdThanhPhamChon; this.IdLoXoDongCuonChon = mucThPhamDongCuon.IdLoXoChon; } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtGayDay.TextChanged += new EventHandler(TextBoxes_TextChanged); txtGayCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtGayDay.TextChanged += new EventHandler(TextBoxes_Leave); txtGayCao.TextChanged += new EventHandler(TextBoxes_Leave); lstLoXo.SelectedItemChanged += new EventHandler(ListView_SelectedItemChanged); cboMayLoXo.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(DropDownList_SelectedIndexChanged); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtGayDay.KeyPress += new KeyPressEventHandler(InputValidator); txtGayCao.KeyPress += new KeyPressEventHandler(InputValidator); }