Пример #1
0
        private void btnTinhThu_EpKim_Click(object sender, EventArgs e)
        {
            var idHangKH       = int.Parse(cboHangKH.SelectedValue.ToString());
            var thongTinBanDau = this.thongTinBanDauChoThPh(idHangKH, LoaiThanhPhamS.EpKim,
                                                            FormStateS.View, "Ép kim [Tính thử]", "Con");
            //tạo mới mục ép kim
            var mucThPhEpKim = new MucThPhEpKim();

            mucThPhEpKim.IdBaiIn         = 1;
            mucThPhEpKim.IdHangKhachHang = this.IdHangKhachHang;
            mucThPhEpKim.LoaiThanhPham   = LoaiThanhPhamS.EpKim;
            mucThPhEpKim.SoLuong         = 10; //Tạm
            mucThPhEpKim.DonViTinh       = "con";
            mucThPhEpKim.KhoEpRong       = 5f;
            mucThPhEpKim.KhoEpCao        = 5f;
            mucThPhEpKim.KhoToChayRong   = 32;//cm
            mucThPhEpKim.KhoToChayDai    = 22;
            mucThPhEpKim.SoLuongToChay   = 10;
            var frm = new ThPhEpKimForm(thongTinBanDau, mucThPhEpKim);

            frm.MinimizeBox   = false;
            frm.MaximizeBox   = false;
            frm.StartPosition = FormStartPosition.CenterParent;
            //Data gởi qua form
            frm.ShowDialog();
        }
Пример #2
0
        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();
        }