Esempio n. 1
0
        public frmImport()
        {
            repClinic      = new ClinicRepository();
            repDefine      = new DefineRepository();
            repMedicine    = new MedicineRepository();
            repwh          = new WareHouseRepository();
            repwhDetail    = new WareHouseDetailRepository();
            _repwhIo       = new WareHouseIORepository();
            _repwhIoDetail = new WareHouseIODetailRepository();

            InitializeComponent();
            repClinic = new ClinicRepository();
            FillToComboboxClinic(0);
            dateImport.Value = DateTime.Now.Date;


            try
            {
                InitGrid();
                //bindingSource3.DataSource = repMedicine.GetAll();
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Esempio n. 2
0
 public frmExportDetail(int exportId)
 {
     repClinic      = new ClinicRepository();
     repDefine      = new DefineRepository();
     repMedicine    = new MedicineRepository();
     repwh          = new WareHouseRepository();
     repwhDetail    = new WareHouseDetailRepository();
     _repwhIo       = new WareHouseIORepository();
     _repwhIoDetail = new WareHouseIODetailRepository();
     whExport       = new WareHouseExportAllocateRepository();
     InitializeComponent();
     repClinic           = new ClinicRepository();
     cbClinic.DataSource = repClinic.GetAll();
     dateImport.Value    = DateTime.Now.Date;
     whPaperId           = exportId;
     try
     {
         InitGrid();
         LoadData(exportId);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
        public void AddedDefine_not_adding_should_not_be_found()
        {
            DefineRepository repo  = new DefineRepository();
            bool             found = repo.TryGetValue("Test", out var res);

            Assert.IsFalse(found);
            Assert.IsTrue(string.IsNullOrEmpty(res));
        }
        public void AddedDefine_should_be_found()
        {
            string           key = "Test", value = "$9F";
            DefineRepository repo = new DefineRepository();

            repo.AddDefine(key, "$9F");
            bool found = repo.TryGetValue(key, out var res);

            Assert.IsTrue(found);
            Assert.AreEqual(value, res);
        }