Exemple #1
0
        public ActionResult GetTransactionData(string txnid)
        {
            try
            {
                using (ICollectionTransaction collectionTransactionBL = new CollectionTransactionBL())
                {
                    CollectionTransactionViewModel collectionTransactionViewModel = collectionTransactionBL.GetCollectionTransactionDetails(txnid);
                    if (collectionTransactionViewModel.TransactionStatus == (int)EnumModel.TransactionStatus.Pending)
                    {
                        Array values = Enum.GetValues(typeof(EnumModel.ModeofPayment));
                        List <SelectListItem> items = new List <SelectListItem>(values.Length);

                        foreach (var i in values)
                        {
                            items.Add(new SelectListItem
                            {
                                Text  = Enum.GetName(typeof(EnumModel.ModeofPayment), i),
                                Value = ((int)i).ToString()
                            });
                        }
                        ViewBag.ListMOP = new SelectList(items, "Text", "Value", "Select");
                    }
                    return(View("_TransactionData", collectionTransactionViewModel));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Exemple #2
0
 public ActionResult GetServiceByDept(int deptId)
 {
     try
     {
         List <ServiceModel> serviceModelList = new List <ServiceModel>();
         using (ICollectionTransaction collectionTransactionBL = new CollectionTransactionBL())
         {
             serviceModelList = collectionTransactionBL.GetAllServices(deptId);
         }
         return(Json(serviceModelList, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemple #3
0
 public ActionResult GetServiceDetailsById(int serviceId)
 {
     try
     {
         ServiceModel serviceModel = new ServiceModel();
         using (ICollectionTransaction collectionTransactionBL = new CollectionTransactionBL())
         {
             serviceModel = collectionTransactionBL.GetServicebyId(serviceId);
         }
         return(Json(serviceModel.ObjectCode, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemple #4
0
 public ActionResult ApplicationForm()
 {
     try
     {
         CollectionTransactionViewModel collectionTransactionViewModel = new CollectionTransactionViewModel();
         using (ICollectionTransaction collectionTransactionBL = new CollectionTransactionBL())
         {
             collectionTransactionViewModel.DepartmentModelList = collectionTransactionBL.GetAllDepartments();
             collectionTransactionViewModel.ServiceModelList    = new List <ServiceModel>();
         }
         return(View(collectionTransactionViewModel));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemple #5
0
 public ActionResult AddApplicationForm(CollectionTransactionViewModel collectionTransactionViewModel)
 {
     try
     {
         UserModel userModel = new UserModel();
         userModel = (UserModel)Session["UserModel"];
         collectionTransactionViewModel.CreatedBy = userModel.UserId;
         using (ICollectionTransaction collectionTransactionBL = new CollectionTransactionBL())
         {
             OperationModel operationModel = collectionTransactionBL.AddTransactionData(collectionTransactionViewModel);
             return(Json(new { result = operationModel.OperationMessage }, JsonRequestBehavior.AllowGet));
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }