Ejemplo n.º 1
0
 /// <summary>
 /// Adds the batch.
 /// </summary>
 /// <param name="batch">The batch.</param>
 /// <returns></returns>
 public static bool AddBatch(Batch batch)
 {
     try
     {
         return(BatchDAL.AddBatch(batch));
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 2
0
        public void TestAddBatch()
        {
            bool success1, success2, success3, success4, success5, success6;

            success1 = success2 = success3 = success4 = success5 = success6 = false;

            success1 = BatchDAL.AddBatch(_batch1);
            success2 = BatchDAL.AddBatch(_batch2);
            success3 = BatchDAL.AddBatch(_batch3);
            success4 = BatchDAL.AddBatch(_batch4);
            success5 = BatchDAL.AddBatch(_batch5);
            success6 = BatchDAL.AddBatch(_batch6);

            Assert.IsTrue(success1 && success2 && success3 && success4 && success5 && success6);
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            type1 = new BatchType("Test1", 12.34, 56.7, 123, null, 65, 142424);
            type2 = new BatchType("Test2", 442.2, 2521.11, 1223, 473, 765, 1212424);
            type3 = new BatchType("Test3", 675.43, 3900.03444, 123, 43, 65, 5787878);
            type4 = new BatchType("Test4", 49.03, 98.48, 123, 43, 65, null);
            BatchTypeDAL.AddBatchType(type1);
            BatchTypeDAL.AddBatchType(type2);
            BatchTypeDAL.AddBatchType(type3);
            BatchTypeDAL.AddBatchType(type4);

            _batch1 = new Batch("Machine1", Convert.ToDateTime("2001-01-01"), type1, true);
            _batch2 = new Batch("Machine2", Convert.ToDateTime("2001-01-01"), type2, true);
            _batch3 = new Batch("Machine3", Convert.ToDateTime("2001-01-01"), type3, true);
            _batch4 = new Batch("Machine4", Convert.ToDateTime("2001-01-01"), type1, true);
            _batch5 = new Batch("Machine5", Convert.ToDateTime("2001-01-01"), type1, true);
            _batch6 = new Batch("Machine6", Convert.ToDateTime("2001-01-01"), type4, false);
            BatchDAL.AddBatch(_batch1);
            BatchDAL.AddBatch(_batch2);
            BatchDAL.AddBatch(_batch3);
            BatchDAL.AddBatch(_batch4);
            BatchDAL.AddBatch(_batch5);
            BatchDAL.AddBatch(_batch6);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// To add batch details to database
 /// </summary>
 /// <param name="oBatchBO"></param>
 /// <returns></returns>
 public BatchBO AddBatch(BatchBO oBatchBO)
 {
     oBatchDAL = new BatchDAL();
     return(oBatchDAL.AddBatch(oBatchBO));
 }