Пример #1
0
 // DELETE api/<controller>
 public void Delete(Guid ID)
 {
     var service = new Cat_MasterProjectServices();
     var result  = service.Remove <Cat_MasterProjectEntity>(ID);
 }
Пример #2
0
 // DELETE api/<controller>
 public void Delete(Guid ID)
 {
     var service = new Cat_MasterProjectServices();
     var result = service.Remove<Cat_MasterProjectEntity>(ID);
 }
Пример #3
0
        public JsonResult GetProjectCascading(Guid budgetOwnerID, string provinceFilter)
        {
            var result = new List<Cat_MasterProjectModel>();
            string status = string.Empty;
            if (budgetOwnerID != Guid.Empty)
            {
                var serivces = new ActionService(UserLogin);
                var entity = serivces.GetByIdUseStore<Fin_PurchaseRequestModel>(budgetOwnerID, ConstantSql.hrm_cat_sp_get_OwnerByIds, ref status);

                var ProjectServices = new Cat_MasterProjectServices();
                var lstObj = new List<object>();
                lstObj.Add(null);
                lstObj.Add(1);
                lstObj.Add(int.MaxValue - 1);
                var lstMasterProject = ProjectServices.GetData<Cat_MasterProjectModel>(lstObj, ConstantSql.hrm_cat_sp_get_MasterProject, UserLogin, ref status);
                if (entity != null)
                {
                    if (entity.BudgetOwnerName != "EUCERIN")
                    {
                        var lstMasterProjects = lstMasterProject.Where(s => s.Type != "EUCERIN");
                        return Json(lstMasterProjects, JsonRequestBehavior.AllowGet);
                    }
                    else
                    {
                        return Json(result, JsonRequestBehavior.AllowGet);
                    }
                }
            }
            return Json(result, JsonRequestBehavior.AllowGet);
        }