Ejemplo n.º 1
0
        public PartialViewResult Printable_Y_Article(int y_Article_Id)
        {
            ViewBag.Title = "KPCL ERP :: Print";

            YArticleViewModel yViewModel = new YArticleViewModel();

            yViewModel.YArticle.Y_Article_Id = y_Article_Id;

            try
            {
                yViewModel.YArticle = _yArticleMan.Get_YArticle_By_Id(yViewModel.YArticle.Y_Article_Id);
            }
            catch (Exception ex)
            {
                yViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("YArticle Controller - Printable_Y_Article " + ex.ToString());
            }

            return(PartialView("_PrintableView", yViewModel));
        }
Ejemplo n.º 2
0
        public JsonResult Update(EnquiryViewModel eViewModel)
        {
            try
            {
                eViewModel.Enquiry.UpdatedBy = ((UserInfo)Session["User"]).UserId;

                eViewModel.Enquiry.UpdatedOn = DateTime.Now;

                _enquiryMan.Update_Enquiry(eViewModel.Enquiry);

                eViewModel.Friendly_Message.Add(MessageStore.Get("EQ002"));
            }
            catch (Exception ex)
            {
                eViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

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

            return(Json(eViewModel));
        }
Ejemplo n.º 3
0
        public JsonResult Update_Enquiry_PPC_Checkpoint(EnquiryViewModel eViewModel)
        {
            try
            {
                eViewModel.Enquiry.UpdatedBy = ((UserInfo)Session["User"]).UserId;

                eViewModel.Enquiry.UpdatedOn = DateTime.Now;

                _enquiryMan.Update_Enquiry_PPC_Checkpoint(eViewModel.Enquiry);

                eViewModel.Friendly_Message.Add(MessageStore.Get("EQ014"));
            }
            catch (Exception ex)
            {
                eViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

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

            return(Json(eViewModel, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
        public JsonResult UpdateCustomerCategory(HotelTariffViewModel htViewModel)
        {
            try
            {
                Set_Date_Session(htViewModel.HotelTariffCustomerCategory);

                _htRepo.UpdateCustomerCategory(htViewModel.HotelTariffCustomerCategory);

                htViewModel.FriendlyMessage.Add(MessageStore.Get("HotelTariffCustomerCategory02"));

                Logger.Debug("HotelTariff Controller UpdateCustomerCategory");
            }
            catch (Exception ex)
            {
                htViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("HotelTariff Controller - UpdateCustomerCategory " + ex.Message);
            }

            return(Json(htViewModel));
        }
Ejemplo n.º 5
0
        public JsonResult Update(VehicleViewModel vViewModel)
        {
            try
            {
                Set_Date_Session(vViewModel.Vehicle);

                _vRepo.UpdateVehicle(vViewModel.Vehicle);

                vViewModel.FriendlyMessage.Add(MessageStore.Get("Ve02"));

                Logger.Debug("Vehicle Controller UpdateVehicle");
            }
            catch (Exception ex)
            {
                vViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Vehicle Controller - UpdateVehicle  " + ex.Message);
            }

            return(Json(vViewModel));
        }
Ejemplo n.º 6
0
        public JsonResult Update(TaxFormulaViewModel tViewModel)
        {
            try
            {
                Set_Date_Session(tViewModel.TaxFormula);

                _tRepo.UpdateTaxFormula(tViewModel.TaxFormula);

                tViewModel.FriendlyMessage.Add(MessageStore.Get("TF02"));

                Logger.Debug("TaxFormula Controller Update");
            }
            catch (Exception ex)
            {
                tViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("TaxFormula Controller - Update  " + ex.Message);
            }

            return(Json(tViewModel));
        }
Ejemplo n.º 7
0
        public JsonResult UpdateRoom(HotelTariffViewModel htViewModel)
        {
            try
            {
                Set_Date_Session(htViewModel.HotelTariffRoom);

                _htRepo.UpdateHotelTariffRoomDetails(htViewModel.HotelTariffRoom);

                htViewModel.FriendlyMessage.Add(MessageStore.Get("HotelTariffRoom02"));

                Logger.Debug("HotelTariff Controller UpdateRoom");
            }
            catch (Exception ex)
            {
                htViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("HotelTariff Controller - UpdateRoom  " + ex.Message);
            }

            return(Json(htViewModel));
        }
Ejemplo n.º 8
0
        public JsonResult Insert(RoomTypeViewModel rtViewModel)
        {
            try
            {
                Set_Date_Session(rtViewModel.RoomType);

                rtViewModel.RoomType.RoomTypeId = _rtRepo.Insert(rtViewModel.RoomType);

                rtViewModel.FriendlyMessage.Add(MessageStore.Get("RT01"));

                Logger.Debug("RoomType Controller Insert");
            }
            catch (Exception ex)
            {
                rtViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("RoomType Controller - Insert " + ex.Message);
            }

            return(Json(rtViewModel));
        }
Ejemplo n.º 9
0
        public JsonResult Update(RoomTypeViewModel rtViewModel)
        {
            try
            {
                Set_Date_Session(rtViewModel.RoomType);

                _rtRepo.Update(rtViewModel.RoomType);

                rtViewModel.FriendlyMessage.Add(MessageStore.Get("RT02"));

                Logger.Debug("RoomType Controller Update");
            }
            catch (Exception ex)
            {
                rtViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("RoomType Controller - Update  " + ex.Message);
            }

            return(Json(rtViewModel));
        }
Ejemplo n.º 10
0
        public PartialViewResult Printable_Quality(int quality_Id)
        {
            ViewBag.Title = "KPCL ERP :: Print";

            QualityViewModel qViewModel = new QualityViewModel();

            qViewModel.Quality.Quality_Id = quality_Id;

            try
            {
                qViewModel.Quality = _qualityMan.Get_Quality_By_Id(qViewModel.Quality.Quality_Id);
            }
            catch (Exception ex)
            {
                qViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Quality Controller - Search " + ex.ToString());
            }

            return(PartialView("_PrintableView", qViewModel));
        }
Ejemplo n.º 11
0
        public ActionResult Update_Quality(QualityViewModel qViewModel)
        {
            try
            {
                qViewModel.Quality.UpdatedBy = ((UserInfo)Session["User"]).UserId;

                qViewModel.Quality.UpdatedOn = DateTime.Now;

                _qualityMan.Update_Quality(qViewModel.Quality);

                qViewModel.Friendly_Message.Add(MessageStore.Get("Q012"));
            }
            catch (Exception ex)
            {
                qViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

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

            return(Json(qViewModel));
        }
Ejemplo n.º 12
0
        public JsonResult AddCustomerPayment(BookingViewModel bViewModel)
        {
            Set_Date_Session(bViewModel.PaymentDetailsInfo);

            try
            {
                _bRepo.AddCustomerPayment(bViewModel.PaymentDetailsInfo);

                bViewModel.FriendlyMessage.Add(MessageStore.Get("PAY01"));
            }
            catch (Exception ex)
            {
                bViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Booking Controller - AddCustomerPayment" + ex.ToString());
            }
            TempData["bViewModel"] = bViewModel;
            return(Json(bViewModel));
            // return View("_AddPayment", bViewModel);
            // return RedirectToAction ("GetBookingList", bViewModel);
        }
Ejemplo n.º 13
0
        public JsonResult Update(CustomerViewModel cViewModel)
        {
            try
            {
                Set_Date_Session(cViewModel.Customer);

                _cRepo.UpdateCustomer(cViewModel.Customer);

                cViewModel.FriendlyMessage.Add(MessageStore.Get("Cu02"));

                Logger.Debug("Customer Controller UpdateCustomer");
            }
            catch (Exception ex)
            {
                cViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Customer Controller - UpdateCustomer  " + ex.Message);
            }

            return(Json(cViewModel));
        }
Ejemplo n.º 14
0
        public JsonResult UpdateLohanaPackageTariffVehicle(LohanaPackageTariffViewModel lpViewModel)
        {
            try
            {
                Set_Date_Session(lpViewModel.LohanaPackageTariffVehicle);

                _lpRepo.UpdateLohanaPackageTariffVehicle(lpViewModel.LohanaPackageTariffVehicle);

                lpViewModel.FriendlyMessage.Add(MessageStore.Get("LohanaTariff08"));

                Logger.Debug("LohanaPackageTariff Controller UpdateLohanaPackageTariffVehicle");
            }
            catch (Exception ex)
            {
                lpViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("LohanaPackageTariff Controller - UpdateLohanaPackageTariffVehicle  " + ex.Message);
            }

            return(Json(lpViewModel));
        }
Ejemplo n.º 15
0
        public JsonResult Update(CountryViewModel cViewModel)
        {
            try
            {
                Set_Date_Session(cViewModel.Country);

                _cRepo.Update(cViewModel.Country);

                cViewModel.FriendlyMessage.Add(MessageStore.Get("COUNTRY02"));

                Logger.Debug("Country Controller Update");
            }
            catch (Exception ex)
            {
                cViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Country Controller - Update  " + ex.Message);
            }

            return(Json(cViewModel));
        }
Ejemplo n.º 16
0
        public ActionResult Update(VendorContactViewModel vcViewModel)
        {
            try
            {
                vcViewModel.Vendor_Contact.UpdatedOn = DateTime.Now;

                vcViewModel.Vendor_Contact.UpdatedBy = ((UserInfo)Session["User"]).UserId;

                _vendorcontactMan.Update_Vendor_Contact(vcViewModel.Vendor_Contact);

                vcViewModel.Friendly_Message.Add(MessageStore.Get("VC003"));
            }
            catch (Exception ex)
            {
                vcViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Vendor Contact Controller - Update " + ex.ToString());
            }

            return(Json(vcViewModel));
        }
Ejemplo n.º 17
0
        public JsonResult Update(MealViewModel mViewModel)
        {
            try
            {
                Set_Date_Session(mViewModel.Meal);

                _mRepo.Update(mViewModel.Meal);

                mViewModel.FriendlyMessage.Add(MessageStore.Get("M02"));

                Logger.Debug("Meal Controller Update");
            }
            catch (Exception ex)
            {
                mViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Meal Controller - Update  " + ex.Message);
            }

            return(Json(mViewModel));
        }
Ejemplo n.º 18
0
        public PartialViewResult Printable_Vendor_Contact(int contact_Id)
        {
            ViewBag.Title = "KPCL ERP :: Print";

            VendorContactViewModel vcViewModel = new VendorContactViewModel();

            vcViewModel.Vendor_Contact.Contact_Id = contact_Id;

            try
            {
                vcViewModel.Vendor_Contact = _vendorcontactMan.Get_Vendor_Contact_By_Id(vcViewModel.Vendor_Contact.Contact_Id);
            }
            catch (Exception ex)
            {
                vcViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Vendor Contact Controller - Printable_Vendor_Contact " + ex.ToString());
            }

            return(PartialView("_PrintableView", vcViewModel));
        }
Ejemplo n.º 19
0
        public JsonResult Update(StateViewModel sViewModel)
        {
            try
            {
                Set_Date_Session(sViewModel.State);

                _sRepo.Update(sViewModel.State);

                sViewModel.FriendlyMessage.Add(MessageStore.Get("STATE02"));

                Logger.Debug("State Controller Update");
            }
            catch (Exception ex)
            {
                sViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("State Controller - Update  " + ex.Message);
            }

            return(Json(sViewModel));
        }
Ejemplo n.º 20
0
        public PartialViewResult Printable_C_Article(int c_Article_Id)
        {
            ViewBag.Title = "KPCL ERP :: Print";

            CArticleViewModel cViewModel = new CArticleViewModel();

            cViewModel.CArticle.C_Article_Id = c_Article_Id;

            try
            {
                cViewModel.CArticle = _cArticleMan.Get_CArticle_By_Id(cViewModel.CArticle.C_Article_Id);
            }
            catch (Exception ex)
            {
                cViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("CArticle Controller - Printable_C_Article " + ex.ToString());
            }

            return(PartialView("_PrintableView", cViewModel));
        }
Ejemplo n.º 21
0
        // [AuthorizeUser(RoleModule.HotelTariff, Function.Create)]
        public JsonResult InsertRoomOccupancy(HotelTariffViewModel htViewModel)
        {
            try
            {
                Set_Date_Session(htViewModel.HotelTariffRoomOccupancy);

                htViewModel.HotelTariffRoomOccupancy.HotelTariffRoomOccupancyId = _htRepo.InsertHotelTariffRoomOccupancy(htViewModel.HotelTariffRoomOccupancy);

                htViewModel.FriendlyMessage.Add(MessageStore.Get("HotelTariffRoomOccupancy01"));

                Logger.Debug("HotelTariff Controller InsertRoomOccupancy");
            }
            catch (Exception ex)
            {
                htViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("HotelTariff Controller - InsertRoomOccupancy " + ex.Message);
            }

            return(Json(htViewModel));
        }
Ejemplo n.º 22
0
        public JsonResult Insert(FacilityTypeViewModel ftViewModel)
        {
            try
            {
                Set_Date_Session(ftViewModel.FacilityType);

                ftViewModel.FacilityType.FacilityTypeId = _ftRepo.Insert(ftViewModel.FacilityType);

                ftViewModel.FriendlyMessage.Add(MessageStore.Get("FT01"));

                Logger.Debug("FacilityType Controller Insert");
            }
            catch (Exception ex)
            {
                ftViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("FacilityType Controller - Insert " + ex.Message);
            }

            return(Json(ftViewModel));
        }
Ejemplo n.º 23
0
        public JsonResult UpdateSupplierHotelPrice(SupplierHotelTariffViewModel sViewModel)
        {
            try
            {
                Set_Date_Session(sViewModel.SupplierHotelPrice);

                _sRepo.UpdateSupplierHotelPrice(sViewModel.SupplierHotelPrice);

                sViewModel.FriendlyMessage.Add(MessageStore.Get("HotelTariffPrice02"));

                Logger.Debug("HotelTariff Controller InsertPrice");
            }
            catch (Exception ex)
            {
                sViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Hotel Tariff Controller - UpdatePrice  " + ex.Message);
            }

            return(Json(sViewModel));
        }
Ejemplo n.º 24
0
        public JsonResult Update(FacilityTypeViewModel ftViewModel)
        {
            try
            {
                Set_Date_Session(ftViewModel.FacilityType);

                _ftRepo.Update(ftViewModel.FacilityType);

                ftViewModel.FriendlyMessage.Add(MessageStore.Get("FT02"));

                Logger.Debug("FacilityType Controller Update");
            }
            catch (Exception ex)
            {
                ftViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("FacilityType Controller - Update  " + ex.Message);
            }

            return(Json(ftViewModel));
        }
Ejemplo n.º 25
0
        public JsonResult Insert(VehicleViewModel vViewModel)
        {
            try
            {
                Set_Date_Session(vViewModel.Vehicle);

                vViewModel.Vehicle.VehicleId = _vRepo.Insert(vViewModel.Vehicle);

                vViewModel.FriendlyMessage.Add(MessageStore.Get("Ve01"));

                Logger.Debug("Vehicle Controller Insert");
            }
            catch (Exception ex)
            {
                vViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Vehicle Controller - Insert " + ex.Message);
            }

            return(Json(vViewModel));
        }
Ejemplo n.º 26
0
        public JsonResult Update_Vendor_Central_Excise(VendorViewModel vViewModel)
        {
            try
            {
                vViewModel.Vendor.UpdatedOn = DateTime.Now;

                vViewModel.Vendor.UpdatedBy = ((UserInfo)Session["User"]).UserId;

                _vendorMan.Update_Vendor_Central_Excise(vViewModel.Vendor);

                vViewModel.Friendly_Message.Add(MessageStore.Get("V012"));
            }
            catch (Exception ex)
            {
                vViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Vendor Controller - Update_Vendor_Central_Excise " + ex.ToString());
            }

            return(Json(vViewModel));
        }
Ejemplo n.º 27
0
        public JsonResult Update_Temp_Customer_Quality_Details(EnquiryViewModel eViewModel)
        {
            try
            {
                eViewModel.Enquiry.Temp_Customer_Quality_Details.UpdatedBy = ((UserInfo)Session["User"]).UserId;

                eViewModel.Enquiry.Temp_Customer_Quality_Details.UpdatedOn = DateTime.Now;

                _enquiryMan.Update_Temp_Customer_Quality_Details(eViewModel.Enquiry.Temp_Customer_Quality_Details);

                eViewModel.Friendly_Message.Add(MessageStore.Get("EQ007"));
            }
            catch (Exception ex)
            {
                eViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

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

            return(Json(eViewModel));
        }
Ejemplo n.º 28
0
        public JsonResult Insert(CountryViewModel cViewModel)
        {
            try
            {
                Set_Date_Session(cViewModel.Country);

                cViewModel.Country.CountryId = _cRepo.Insert(cViewModel.Country);

                cViewModel.FriendlyMessage.Add(MessageStore.Get("COUNTRY01"));

                Logger.Debug("Country Controller Insert");
            }
            catch (Exception ex)
            {
                cViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Country Controller - Insert " + ex.Message);
            }

            return(Json(cViewModel));
        }
Ejemplo n.º 29
0
        public JsonResult UpdateSightSeeingTariff(SightSeeingTariffViewModel sstViewModel)
        {
            try
            {
                Set_Date_Session(sstViewModel.SightSeeingTariff);

                _sstRepo.UpdateSightSeeingTariff(sstViewModel.SightSeeingTariff);

                sstViewModel.FriendlyMessage.Add(MessageStore.Get("SightSeeingTariff02"));

                Logger.Debug("SightSeeingTariff Controller Update");
            }
            catch (Exception ex)
            {
                sstViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("SightSeeingTariff Controller - Update  " + ex.Message);
            }

            return(Json(JsonConvert.SerializeObject(sstViewModel)));
        }
Ejemplo n.º 30
0
        public JsonResult Insert(HotelViewModel hViewModel)
        {
            try
            {
                Set_Date_Session(hViewModel.Hotel);

                hViewModel.Hotel.HotelId = _hRepo.Insert(hViewModel.Hotel);

                hViewModel.FriendlyMessage.Add(MessageStore.Get("HM01"));

                Logger.Debug("Hotel Controller InsertHotelBasicDetails");
            }
            catch (Exception ex)
            {
                hViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("Hotel Controller - InsertHotelBasicDetails " + ex.Message);
            }

            return(Json(hViewModel));
        }