private void btnInBG_Click(object sender, EventArgs e) { Form frm1 = (Form)QLBHUtils.GetObject(Declare.KhoHangNamespace.frmInNoteSP, null); frm1.ShowDialog(); //if (selector.selection.Count == 0) return; //ArrayList liSanPham = new ArrayList(); //liSanPham.AddRange(selector.selection); //frmBH_BangGiaBanHang_InBG frm = new frmBH_BangGiaBanHang_InBG(liSanPham); //frm.ShowDialog(); }
protected virtual T1 CreateSerial(string maVach) { var serial = QLBHUtils.GetObject <T1>() as ChungTuChiTietHangHoaBaseInfo; if (serial == null) { throw new ManagedException("Không đúng kiểu dữ liệu!"); } serial.IdChungTuChiTiet = (ChungTuChiTietInfo as ChungTuChiTietBaseInfo).IdChungTuChiTiet; serial.MaVach = maVach; serial.SoLuong = sanPhamInfo.TrungMaVach == 1 ? (ChungTuChiTietInfo as ChungTuChiTietBaseInfo).SoLuong : 1; serial.IdSanPham = (ChungTuChiTietInfo as ChungTuChiTietBaseInfo).IdSanPham; serial.IsAuto = (ChungTuChiTietInfo as ChungTuChiTietBaseInfo).IsAuto && sanPhamInfo.TrungMaVach == 0; if (sanPhamInfo.TrungMaVach == 1) { for (var i = 0; i < serial.SoLuong; i++) { smallPrinter.Add(new SmallSerial { Date = sysDate.ToString("yyyy/MM/dd"), Serial = maVach, Info = serial, Model = model, LsItemCode = sanPhamInfo.MaSanPham.Substring(sanPhamInfo.MaSanPham.LastIndexOf(".") + 1) }); } } else { bigPrinter.Add(new BigSerial { Date = sysDate.ToString("yyyy/MM/dd"), Serial = maVach, Info = serial, Model = model, LsItemCode = sanPhamInfo.MaSanPham.Substring(sanPhamInfo.MaSanPham.LastIndexOf(".") + 1), //TenSanPham = sanPhamInfo.TenSanPham.Replace(model, String.Empty).Replace("()", String.Empty).Trim() }); } return(serial as T1); }
private void run(string param) { Application.Run((System.Windows.Forms.Form)QLBHUtils.GetObject(param)); }