Пример #1
0
        public JsonResult AddUpdatePlanSelectedByVendor(string plan_id)
        {
            int         id          = Convert.ToInt32(plan_id);
            ResponseOut responseOut = new ResponseOut();
            IPlansBL    planBL      = new PlansEngine();

            try
            {
                if (id != 0)
                {
                    int user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);
                    responseOut = planBL.AddUpdateSelectPlanByVendor(id, user_id);
                }
                else
                {
                    responseOut.message = ActionMessage.ProbleminData;
                    responseOut.status  = ActionStatus.Fail;
                }
            }
            catch (Exception ex)
            {
                Log.Error("Error in VendorController/AddUpdatePlanSelectedByVendor", ex);
                responseOut.message = ActionMessage.ApplicationException;
                responseOut.status  = ActionStatus.Fail;
            }
            return(Json(responseOut, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public ActionResult GetPlansById(int id)
        {
            IPlansBL planBL = new PlansEngine();

            try
            {
                var data = planBL.GetPlansById(id);
                return(Json(data, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Log.Error("Error in PlansController/GetPlansById", ex);
                throw ex;
            }
        }
Пример #3
0
        public PartialViewResult _VendorPlansList()
        {
            IPlansBL planBL = new PlansEngine();
            List <VendorPlansViewModel> VendorPlansList = new List <VendorPlansViewModel>();

            try {
                VendorPlansList = planBL.GetVendorPlans();
                return(PartialView(VendorPlansList));
            }
            catch (Exception ex)
            {
                Log.Error("Error in PlansController/_VendorPlansList", ex);
                return(null);
            }
        }
Пример #4
0
        public PartialViewResult _ApprovedCandidatePlanList()
        {
            IPlansBL planBL = new PlansEngine();
            List <getIsApprovedCandidatePlans_Result> isActivatedPlansList = new List <getIsApprovedCandidatePlans_Result>();

            try
            {
                isActivatedPlansList = planBL.GetApprovedCandidatePlan();
                return(PartialView(isActivatedPlansList));
            }
            catch (Exception ex)
            {
                Log.Error("Error in AdminController/_ApprovedCandidatePlanList", ex);
                return(null);
            }
        }
Пример #5
0
        public PartialViewResult _CandidateInterestReceivedLimit()
        {
            IPlansBL planBL = new PlansEngine();

            try
            {
                int?user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);
                var data    = planBL.CandidateInterestReceivedLimits(user_id);
                return(PartialView(data));
            }
            catch (Exception ex)
            {
                Log.Error("Error in CandidateController/_CandidateInterestReceivedLimit", ex);
                throw ex;
            }
        }
Пример #6
0
        public PartialViewResult _VendorPlan()
        {
            IPlansBL planBL = new PlansEngine();

            try
            {
                int?user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);
                var data    = planBL.GetVendorPricingPlans(user_id);
                return(PartialView(data));
            }
            catch (Exception ex)
            {
                Log.Error("Error in VendorController/Plans", ex);
                throw ex;
            }
            //return PartialView();
        }
Пример #7
0
        public JsonResult UpdatePlanByPlanID(string Id)
        {
            IPlansBL    planBL   = new PlansEngine();
            ResponseOut response = new ResponseOut();

            try
            {
                int planID = Convert.ToInt32(Id);
                response = planBL.UpdatePlanByPlanIDByAdmin(planID);
            }
            catch (Exception ex)
            {
                Log.Error("Error in AdminController/UpdatePlanByPlanID", ex);
                response.message = ActionMessage.ApplicationException;
                response.status  = ActionStatus.Fail;
            }
            return(Json(response, JsonRequestBehavior.AllowGet));
        }
Пример #8
0
        public ActionResult AddPlanType(PlansViewModel data)
        {
            IPlansBL    planBL      = new PlansEngine();
            ResponseOut responseOut = new ResponseOut();

            try
            {
                if (data.pk_plan_id == 0)
                {
                    responseOut = planBL.AddPlans(data);
                }
                else
                {
                    responseOut = planBL.UpdatePlans(data);
                }
            }
            catch (Exception ex)
            {
                Log.Error("Error in PlansController/AddPlanType", ex);
                responseOut.message = ActionMessage.ApplicationException;
                responseOut.status  = ActionStatus.Fail;
            }
            return(Json(responseOut, JsonRequestBehavior.AllowGet));
        }