Ejemplo n.º 1
0
        public ActionResult Get_Enquiry_By_Id(EnquiryViewModel eViewModel)
        {
            AttributeCodeManager attrCodeMan = new AttributeCodeManager();

            PaginationInfo pager = new PaginationInfo();

            pager.IsPagingRequired = false;

            try
            {
                eViewModel.Enquiry = _enquiryMan.Get_Enquiry_By_Id(eViewModel.Enquiry.Enquiry_Id);

                eViewModel.Enquiry.Supporting_Details = _enquiryMan.Get_Supporting_Details_By_Enquiry_Id(eViewModel.Enquiry.Enquiry_Id);

                eViewModel.Enquiry.Temp_Customer_Quality_Details = _enquiryMan.Get_Temp_Customer_Quality_Details_By_Id(eViewModel.Enquiry.Enquiry_Id);

                eViewModel.Attribute_Codes = attrCodeMan.Get_Attribute_Codes(ref pager);
            }
            catch (Exception ex)
            {
                eViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Enquiry Controller - Get_Enquiry_By_Id " + ex.ToString());
            }

            return(Index(eViewModel));
        }
Ejemplo n.º 2
0
        public ActionResult Update(AttributeCodeViewModel aViewModel)
        {
            try
            {
                aViewModel.Attribute_Code.UpdatedOn = DateTime.Now;

                aViewModel.Attribute_Code.UpdatedBy = ((UserInfo)Session["User"]).UserId;

                AttributeCodeManager aMan = new AttributeCodeManager();

                aMan.Update(aViewModel.Attribute_Code);

                aViewModel.Attribute_Code.Attribute_Id = 0;

                aViewModel.Friendly_Message.Add(MessageStore.Get("AC012"));
            }
            catch (Exception ex)
            {
                aViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Attribute Code Controller - Update " + ex.ToString());
            }

            TempData["aViewModel"] = aViewModel;

            return(RedirectToAction("Search"));
        }
Ejemplo n.º 3
0
        public JsonResult Get_Grid_By_Attribute_Name(AttributeCodeViewModel aViewModel)
        {
            AttributeCodeManager aMan = new AttributeCodeManager();

            PaginationInfo pager = new PaginationInfo();

            if (aViewModel.Filter.Attribute_Id > 0)
            {
                aViewModel.Attribute_Code_Grid = aMan.Get_Grid_By_Attrinute_Code_Name(aViewModel.Filter.Attribute_Id);
            }

            return(Json(aViewModel, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
        public ActionResult Get_Attribute_Code_By_Id(AttributeCodeViewModel aViewModel)
        {
            try
            {
                AttributeCodeManager aMan = new AttributeCodeManager();

                aViewModel.Attribute_Code = aMan.Get_Attribute_Code_By_Id(aViewModel.Edit_Mode.Attribute_Code_Id);

                return(View("Index", aViewModel));
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 5
0
        public JsonResult Get_Attribute_Codes(AttributeCodeViewModel aViewModel)
        {
            AttributeCodeManager aMan = new AttributeCodeManager();

            PaginationInfo pager = new PaginationInfo();

            try
            {
                pager = aViewModel.Pager;

                if (aViewModel.Filter.Attribute_Id > 0)
                {
                    aViewModel.Attribute_Code_Grid = aMan.Get_Attribute_Codes_By_Attribute_Name(aViewModel.Filter.Attribute_Id, ref pager);
                }

                else
                {
                    aViewModel.Attribute_Code_Grid = aMan.Get_Attribute_Codes(ref pager);
                }

                aViewModel.Pager = pager;

                aViewModel.Pager.PageHtmlString = PageHelper.NumericPager("javascript:PageMore({0})", aViewModel.Pager.TotalRecords, aViewModel.Pager.CurrentPage + 1, aViewModel.Pager.PageSize, 10, true);
            }

            catch (Exception ex)
            {
                aViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Attribute Code Controller - Get_Attribute_Codes " + ex.ToString());
            }

            finally
            {
                pager = null;
            }
            return(Json(aViewModel, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 6
0
 public CArticleController()
 {
     _cArticleMan = new CArticleManager();
     _attMan      = new AttributeCodeManager();
 }
Ejemplo n.º 7
0
        public YArticleController()
        {
            _yArticleMan = new YArticleManager();

            _attMan = new AttributeCodeManager();
        }
Ejemplo n.º 8
0
        public PArticleController()
        {
            _particleMan = new PArticleManager();

            _attMan = new AttributeCodeManager();
        }
Ejemplo n.º 9
0
        public GArticleController()
        {
            _garticleMan = new GArticleManager();

            _attMan = new AttributeCodeManager();
        }
Ejemplo n.º 10
0
 public WArticleController()
 {
     _wArticleMan = new WArticleManager();
     _attMan      = new AttributeCodeManager();
 }