コード例 #1
0
ファイル: TinhGiaForm.cs プロジェクト: DzungHg/TinhGiaDigi2
        private void ThemDanhThiep()
        {
            var thongTinBanDau = new ThongTinBanDauChoDanhThiep
            {
                IdHangKhachHang = this.IdHangKhachHang(),
                TinhTrangForm   = FormStateS.New
            };

            BaiInDanhThiep baiInDThiep = new BaiInDanhThiep(0, "", "9 x 5.5cm", 5, 2);

            baiInDThiep.TieuDe = "Danh thiếp";

            var frm = new GiaInDanhThiepForm(thongTinBanDau, baiInDThiep);

            frm.Text          = "Tính giá danh thiếp";
            frm.MinimizeBox   = false;
            frm.MaximizeBox   = false;
            frm.StartPosition = FormStartPosition.CenterParent;

            frm.ShowDialog();
            if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                XuLyNutOKTrenFormDanhThiep(frm);
                //MessageBox.Show(this.BaiInS.Count().ToString());
                LoadDanhThiepListView();
            }
        }
コード例 #2
0
ファイル: TinhGiaForm.cs プロジェクト: DzungHg/TinhGiaDigi2
        private void XuLyNutOKTrenFormDanhThiep(GiaInDanhThiepForm frm)
        {
            /*var baiIn = new KetQuaBaiIn();
             * baiIn.DonVi = frm.DonViTinh;
             * baiIn.DienGiai = frm.DienGiai;
             * baiIn.TieuDe = frm.TieuDe;
             * baiIn.SoLuong = frm.SoLuong;
             * baiIn.IdHangKH = frm.IdHangKhachHang;
             * baiIn.IdTinhGia = 0;
             * baiIn.TomTat_ChaoKH = frm.TomTatBaiIn_ChaoKH; */

            switch (frm.TinhTrangForm)
            {
            case FormStateS.Edit:
            case FormStateS.New:
                tinhGiaPres.Them_DanhThiep(frm.DocBaiInDanhThiep());
                break;
            }
        }