Beispiel #1
0
        public Result InsertWareHouseData(List <tblWarehouse> wareHouseData)
        {
            IInsertingSetupCommon iDataAccessInsert = new WCMS_Common_Inserting();
            var result = new Result();

            using (
                var transaction = new TransactionScope(TransactionScopeOption.Required,
                                                       ApplicationState.TransactionOptions))
                try
                {
                    result.IsSuccess = iDataAccessInsert.InsertWareHouseData(wareHouseData);

                    if (result.IsSuccess)
                    {
                        transaction.Complete();
                    }
                    else
                    {
                        transaction.Dispose();
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            return(result);
        }
Beispiel #2
0
        public Result InsertBomList(List <BomList> bomList, long userId)
        {
            try
            {
                IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();
                using (var transaction = new TransactionScope(TransactionScopeOption.Required, ApplicationState.TransactionOptions))
                {
                    var result = new Result();


                    foreach (var list in bomList)
                    {
                        var bomLists = new BomList();

                        bomLists.ComponentName = list.ComponentName;
                        bomLists.ComponentCode = list.ComponentCode;
                        bomLists.AddedBy       = userId;
                        bomLists.AddedDate     = DateTime.Now;
                        result.IsSuccess       = _IDataAccessInsert.InsertBomList(bomLists);
                    }



                    if (result.IsSuccess)
                    {
                        transaction.Complete();
                    }
                    return(result);
                }
            }
            catch (Exception ex) { throw ex; }
        }
Beispiel #3
0
        public Result InsertModelsImeiData(System.Collections.Generic.List <ImeiModelUpload> imeiModelUpload)
        {
            IInsertingSetupCommon iDataAccessInsert = new WCMS_Common_Inserting();
            var result = new Result();

            try
            {
                result = iDataAccessInsert.InsertModelsImeiData(imeiModelUpload);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #4
0
        public Result UpdateLoginUser(tblLogin login, string newPassword)
        {
            Result _Result = new Result();

            try
            {
                IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();


                _Result.IsSuccess = _IDataAccessInsert.UpdateLoginUser(login, newPassword);
            }
            catch (Exception ex) { throw ex; }

            return(_Result);
        }
Beispiel #5
0
 public Result InsertProjectBomList(ProjectBomList oProjectBomList)
 {
     try
     {
         IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();
         using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, ApplicationState.TransactionOptions))
         {
             Result _Result = new Result();
             _Result.IsSuccess = _IDataAccessInsert.InsertProjectBomList(oProjectBomList);
             if (_Result.IsSuccess)
             {
                 transaction.Complete();
             }
             return(_Result);
         }
     }
     catch (Exception ex) { throw ex; }
 }
Beispiel #6
0
 public Result UpdateComponentRequisitionList(tblAssemblyLineSetupDetails tblAssemblyLineSetupDetails)
 {
     try
     {
         IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();
         using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, ApplicationState.TransactionOptions))
         {
             Result _Result = new Result();
             _Result.IsSuccess = _IDataAccessInsert.UpdateComponentRequisitionList(tblAssemblyLineSetupDetails);
             if (_Result.IsSuccess)
             {
                 transaction.Complete();
             }
             return(_Result);
         }
     }
     catch (Exception ex) { throw ex; }
 }
Beispiel #7
0
 public Result CreateDailyPackagingList(tblDailyPacking oDailyPacking)
 {
     try
     {
         IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();
         using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, ApplicationState.TransactionOptions))
         {
             Result _Result = new Result();
             _Result.IsSuccess = _IDataAccessInsert.CreateDailyPackagingList(oDailyPacking);
             if (_Result.IsSuccess)
             {
                 transaction.Complete();
             }
             return(_Result);
         }
     }
     catch (Exception ex) { throw ex; }
 }
Beispiel #8
0
        public Result InsertScrewStationInfo(tblScrew screw)
        {
            try
            {
                IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();
                using (var transaction = new TransactionScope(TransactionScopeOption.Required, ApplicationState.TransactionOptions))
                {
                    var result = new Result();


                    result.IsSuccess = _IDataAccessInsert.InsertScrewStationInfo(screw);

                    if (result.IsSuccess)
                    {
                        transaction.Complete();
                    }
                    return(result);
                }
            }
            catch (Exception ex) { throw ex; }
        }
Beispiel #9
0
        public Result InsertIssuedComponents(tblDailyIssuedComponents issuedComponents)
        {
            try
            {
                IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();
                using (var transaction = new TransactionScope(TransactionScopeOption.Required, ApplicationState.TransactionOptions))
                {
                    var result = new Result();

                    issuedComponents.AddedDate = DateTime.Now;
                    result.IsSuccess           = _IDataAccessInsert.InsertIssuedComponents(issuedComponents);

                    if (result.IsSuccess)
                    {
                        transaction.Complete();
                    }
                    return(result);
                }
            }
            catch (Exception ex) { throw ex; }
        }
Beispiel #10
0
 public Result InsertEmployeeInfo(EmployeeInfo _employee, tblLogin login)
 {
     try
     {
         IInsertingSetupCommon _IDataAccessInsert = new WCMS_Common_Inserting();
         using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, ApplicationState.TransactionOptions))
         {
             Result _Result = new Result();
             _Result.IsSuccess = _IDataAccessInsert.InsertEmployeeInfo(_employee);
             if (_Result.IsSuccess)
             {
                 _Result.IsSuccess = _IDataAccessInsert.InsertLoginInfo(login);
                 if (_Result.IsSuccess)
                 {
                     transaction.Complete();
                 }
             }
             return(_Result);
         }
     }
     catch (Exception ex) { throw ex; }
 }