Ejemplo n.º 1
0
 public List <ProjectBomList> GetComponentsByProjectId(ProjectBomList projectBomList)
 {
     try
     {
         ISelectingCommon _IDataAccessSelect = new DALGetCommonSelecting();
         return(_IDataAccessSelect.GetComponentsByProjectId(projectBomList));
     }
     catch (Exception ex) { throw ex; }
 }
Ejemplo n.º 2
0
 public List <ProjectBomList> GetProjectWiseBomList(ProjectBomList projectBomList)
 {
     try
     {
         ISelectingCommon iDataAccessSelect = new DALGetCommonSelecting();
         return(iDataAccessSelect.GetProjectWiseBomList(projectBomList));
     }
     catch (Exception ex) { throw ex; }
 }
 public bool InsertProjectBomList(ProjectBomList oProjectBomList)
 {
     try
     {
         _entity.ProjectBomList.Add(oProjectBomList);
         _entity.SaveChanges();
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(true);
 }
Ejemplo n.º 4
0
        public object GetProjectWiseBomList(ProjectBomList projectBomList)
        {
            var list = new List <ProjectBomList>();

            try
            {
                list = _CommonManager.GetProjectWiseBomList(projectBomList);
            }
            catch (Exception ex)
            {
            }

            return(list);
        }
Ejemplo n.º 5
0
        public List <ProjectBomList> GetComponentsByProjectId(ProjectBomList projectBomList)
        {
            List <ProjectBomList> projectBomLists = new List <ProjectBomList>();

            try
            {
                projectBomLists = _CommonManager.GetComponentsByProjectId(projectBomList);
            }
            catch (Exception ex)
            {
            }

            return(projectBomLists);
        }
Ejemplo n.º 6
0
 public Result InsertProjectBomList(ProjectBomList oProjectBomList)
 {
     try
     {
         return(_CommonManager.InsertProjectBomList(oProjectBomList));
     }
     catch (Exception ex)
     {
         //if (log.IsErrorEnabled)
         //log.Error("Select Bearer: " + ex.Message);
         return(new Result {
             IsSuccess = false, Message = ex.Message
         });
     }
 }
        public List <ProjectBomList> GetProjectWiseBomList(ProjectBomList projectBomList)
        {
            List <ProjectBomList> list;

            try
            {
                list = _wcmsEntities.ProjectBomList
                       .WhereIf(projectBomList.ProjectMasterId != null, x => x.ProjectMasterId == projectBomList.ProjectMasterId)
                       .AsNoTracking().ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(list);
        }
Ejemplo n.º 8
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; }
 }
        public JsonResult CreateProjectBomList(List <ProjectBomList> _projectBomLists)
        {
            var result = new Result();
            var userId = (long)_dictionary[2].Id;


            var oProjectBomList = new ProjectBomList();


            if (userId != 0)
            {
                try
                {
                    foreach (ProjectBomList items in _projectBomLists)
                    {
                        oProjectBomList.ProjectMasterId = items.ProjectMasterId;
                        oProjectBomList.ProjectName     = items.ProjectName;
                        oProjectBomList.ComponentId     = items.ComponentId;
                        oProjectBomList.ComponentName   = items.ComponentName;
                        oProjectBomList.ComponentNumber = items.ComponentNumber;
                        oProjectBomList.IcVendor        = items.IcVendor;
                        oProjectBomList.Quantity        = items.Quantity;
                        oProjectBomList.Remarks         = items.Remarks;
                        oProjectBomList.AddedBy         = userId;
                        oProjectBomList.AddedDate       = DateTime.Now;
                        result = _commonService.InsertProjectBomList(oProjectBomList);
                    }
                }
                catch (Exception)
                {
                    return(Json("Error"));
                }

                return(Json(result));
            }

            else
            {
                return(Json(new Result {
                    Id = "0"
                }));
            }
        }
        public List <ProjectBomList> GetComponentsByProjectId(ProjectBomList projectBomList)
        {
            var list = new List <ProjectBomList>();

            try
            {
                list = _wcmsEntities.ProjectBomList
                       .WhereIf(projectBomList.ProjectMasterId != null, x => x.ProjectMasterId == projectBomList.ProjectMasterId)



                       .AsNoTracking().ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(list);
        }