public ActionResult FeeCollectionRecepiet(int id = 0) { if (id != 0) { int?AdmissionId = null; objBDC = new FeeCollectionBusiness(); ViewBag.FeeCollectionDetail = objBDC.GetFeeCollectionReceiptDetail(id, AdmissionId); } return(View()); }
public ActionResult DeleteStatus(string id) { objBDC = new FeeCollectionBusiness(); int Id = Convert.ToInt32(id); bool _Result = objBDC.FindById(Id); if (_Result == true) { _Result = false; } else { _Result = true; } FeeCollectionCustomModel objModel = new FeeCollectionCustomModel(); objModel.FeeCollectionId = Id; objBDC.DeleteFeeCollectionDetail(objModel); return(RedirectToAction("Index")); }
// GET: FeeCollection/Create public ActionResult Create(int id = 0, int Aid = 0) { FeeCollectionCustomModel objFeeModel = new FeeCollectionCustomModel(); EnquiryDetailCustomModel objModel = new EnquiryDetailCustomModel(); EmployeeMasterModel objEmployeeModel = new EmployeeMasterModel(); objBDCCommon = new CommonMasterDataBusiness(); objBDCENQ = new EnquiryDetailBusiness(); var EmployeeType = objBDCCommon.GetEmployeeMaster(); objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName"); ViewBag.EmployeeInfo = objEmployeeModel.EmployeeList; StudentCommonDetail objRes = new StudentCommonDetail(); var rs = objBDCENQ.GetEnquiryId(Aid); int Eid = ((School.Shared.CustomModels.StudentCommonDetail)rs).EnquiryId; int?ClassId = ((School.Shared.CustomModels.StudentCommonDetail)rs).ClassId; int?SectionId = ((School.Shared.CustomModels.StudentCommonDetail)rs).SectionId; if (Eid != 0) { ViewBag.StudentAdmissionDate = objBDCENQ.GetById(Eid); objBDC = new FeeCollectionBusiness(); ViewBag.FeeCollection = objBDC.GetStudentFeeDetail(Aid, ClassId, SectionId); } if (id != 0) { objBDC = new FeeCollectionBusiness(); objFeeModel = objBDC.GetById(id); } return(View(objFeeModel)); }
public ActionResult Create(FeeCollectionCustomModel objModel, int Aid = 0) { try { if (ModelState.IsValid) { // TODO: Add insert logic here objBDC = new FeeCollectionBusiness(); objBDCENQ = new EnquiryDetailBusiness(); StudentCommonDetail objResult = new StudentCommonDetail(); var rs = objBDCENQ.GetEnquiryId(Aid); int Eid = ((School.Shared.CustomModels.StudentCommonDetail)rs).EnquiryId; int?ClassId = ((School.Shared.CustomModels.StudentCommonDetail)rs).ClassId; int?SectionId = ((School.Shared.CustomModels.StudentCommonDetail)rs).SectionId; if (Eid > 0 && Aid > 0) { objModel.EnquiryId = Eid; objModel.AdmissionId = Aid; objModel.ClassId = ClassId; objModel.SectionId = SectionId; objModel.CreatedBy = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id; objModel.ModifiedBy = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id; objBDC.SaveFeeCollectionMasterDetails(objModel); return(RedirectToAction("Create", new { id = 0, AId = Aid })); } else { return(RedirectToAction("Index")); } } else { objBDCENQ = new EnquiryDetailBusiness(); EmployeeMasterModel objEmployeeModel = new EmployeeMasterModel(); objBDCCommon = new CommonMasterDataBusiness(); var EmployeeType = objBDCCommon.GetEmployeeMaster(); objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName"); ViewBag.EmployeeInfo = objEmployeeModel.EmployeeList; var rs = objBDCENQ.GetEnquiryId(Aid); int Eid = ((School.Shared.CustomModels.StudentCommonDetail)rs).EnquiryId; int?ClassId = ((School.Shared.CustomModels.StudentCommonDetail)rs).ClassId; int?SectionId = ((School.Shared.CustomModels.StudentCommonDetail)rs).SectionId; if (Eid != 0) { ViewBag.StudentAdmissionDate = objBDCENQ.GetById(Eid); objBDC = new FeeCollectionBusiness(); ViewBag.FeeCollection = objBDC.GetStudentFeeDetail(Aid, ClassId, SectionId); } return(View()); } } catch { return(View()); } }