public ActionResult Index(string id)
        {
            if (Request.IsAuthenticated)
            {
                AuthenticateUser();

                int idDecrypted = Security.DecryptId(Convert.ToString(id));

                ViewData["OPDEXPENSE_ID"] = idDecrypted;


                var opdExpenseService = _opdExpenseService.GetOpdExpensesAgainstId(Convert.ToInt32(idDecrypted));

                var opdExpense_Patient = _opdExpensePatientService.GetOpdExpensesPatientAgainstOpdExpenseId(Convert.ToInt32(idDecrypted));

                var objOpdExpensePatient = new OpdExpensePatientVM();

                ViewData["OPDTYPE"] = opdExpenseService.OpdType;
                //Add a Dummy Row.
                opdExpense_Patient.Insert(0, objOpdExpensePatient);

                return(View(opdExpense_Patient));
            }
            else
            {
                return(RedirectToAction("Index", "Home"));
            }
        }
        public ActionResult UpdateOPDExpensePatient(OpdExpensePatientVM opdExpensePatient)
        {
            string emailAddress = GetEmailAddress();

            _opdExpensePatientService.UpdateOpdExpensePatient(opdExpensePatient, emailAddress);

            return(new EmptyResult());
        }
        public JsonResult InsertOPDExpensePatient(OpdExpensePatientVM opdExpense_Patient)
        {
            opdExpense_Patient.CreatedDate = DateTime.Now;

            string emailAddress = GetEmailAddress();

            OpdExpensePatientVM OpdExpensePatientObj = _opdExpensePatientService.CreateOpdExpensePatient(opdExpense_Patient, emailAddress);

            return(Json(OpdExpensePatientObj));
        }
Beispiel #4
0
 public void UpdateOpdExpensePatient(OpdExpensePatientVM opdExpensePatientVM, string emailAddress)
 {
     _opdExpensePatientRepository.Update(Mapper.Map <OpdExpensePatient>(opdExpensePatientVM), emailAddress);
 }
Beispiel #5
0
        public OpdExpensePatientVM CreateOpdExpensePatient(OpdExpensePatientVM opdExpensePatientVM, string emailAddress)
        {
            var ObjOpdExpensePatient = _opdExpensePatientRepository.Add(Mapper.Map <OpdExpensePatient>(opdExpensePatientVM), emailAddress);

            return(Mapper.Map <OpdExpensePatientVM>(ObjOpdExpensePatient));
        }