public DTO.LABURNUM.COM.StudentFeeDetailModel SearchPendingFeeReceiptData(DTO.LABURNUM.COM.StudentFeeDetailModel model) { if (new FrontEndApi.ApiClientApi().IsClientValid(model.ApiClientModel.UserName, model.ApiClientModel.Password)) { DTO.LABURNUM.COM.StudentFeeDetailModel studentFeeDetailModel = new StudentFeeDetailHelper(new FrontEndApi.StudentFeeDetailApi().GetStudentFeeDetailByID(model.StudentFeeDetailId)).MapSingle(); List <API.LABURNUM.COM.StudentFeeDetail> dbstudentfeeDetailList = new FrontEndApi.StudentFeeDetailApi().GetStudentFeeDetailByAdvanceSearch(new DTO.LABURNUM.COM.StudentFeeDetailModel() { StudentId = studentFeeDetailModel.StudentId, ClassId = studentFeeDetailModel.ClassId, SectionId = studentFeeDetailModel.SectionId, AcademicYearId = studentFeeDetailModel.AcademicYearId }); int index = dbstudentfeeDetailList.FindIndex(x => x.StudentFeeDetailId == model.StudentFeeDetailId); API.LABURNUM.COM.StudentFeeDetail dbstudentfeeDetails = new StudentFeeDetail(); if (index >= 0) { index = index + 1; dbstudentfeeDetails = dbstudentfeeDetailList[index]; } if (dbstudentfeeDetails.ChequeStatus == DTO.LABURNUM.COM.Utility.ChequeStatusMaster.GetChequeStatusMasterId(DTO.LABURNUM.COM.Utility.EnumChequeStatusMaster.BOUNCE)) { studentFeeDetailModel.LastPendingFee = dbstudentfeeDetails.PendingFee.GetValueOrDefault(); studentFeeDetailModel.BounceChequePanelty = API.LABURNUM.COM.Component.Constants.DEFAULTVALUE.CHEQUEBOUNCEPANELTY; studentFeeDetailModel.BounceChequeAmount = dbstudentfeeDetails.ChequePaidAmount.GetValueOrDefault(); } else { studentFeeDetailModel.LastPendingFee = dbstudentfeeDetails.PendingFee.GetValueOrDefault(); } return(studentFeeDetailModel); } else { return(null); } }
public ActionResult EditFeeDetail(StudentFeeDetail objClass) { using (wisdomDBEntities db = new wisdomDBEntities()) { ClassController _class = new ClassController(); objClass.Class = _class.GetClassID(objClass.Class).ToString(); StudentFeeDetail Existing = db.StudentFeeDetails.Find(objClass.Id); Existing.Name = objClass.Name; Existing.Class = objClass.Class; Existing.AdmissionNo = objClass.AdmissionNo; Existing.ReciptNo = objClass.ReciptNo; Existing.Months = objClass.Months; Existing.PaidAmount = objClass.PaidAmount; Existing.PreviousDue = objClass.PreviousDue; Existing.TotalAmount = objClass.TotalAmount; Existing.GrandTotal = objClass.GrandTotal; Existing.Balance = objClass.Balance; Existing.Concession = objClass.Concession; Existing.Fine = objClass.Fine; Existing.OldBalanced = objClass.OldBalanced; Existing.TransportFee = objClass.TransportFee; Existing.BalancedShow = objClass.BalancedShow; db.SaveChanges(); return(RedirectToAction("StudentFeeDetailList")); } }
//Class public ActionResult EditFeeDetail(int id) { using (wisdomDBEntities db = new wisdomDBEntities()) { ClassController _class = new ClassController(); StudentFeeDetail SeletedStudentFeeDetail = new StudentFeeDetail(); SeletedStudentFeeDetail = db.StudentFeeDetails.Find(id); SeletedStudentFeeDetail.Class = _class.GetClassName(SeletedStudentFeeDetail.Class); return(View("EditFeeDetail", SeletedStudentFeeDetail)); } }
public ActionResult DeleteFeeDetail(int id) { using (wisdomDBEntities db = new wisdomDBEntities()) { StudentFeeDetail objDelete = db.StudentFeeDetails.Find(id); if (objDelete != null) { db.StudentFeeDetails.Remove(objDelete); db.SaveChanges(); } return(RedirectToAction("StudentFeeDetailList")); } }
public JsonResult UpdateStFeeDetail(string AdmissionNo, StudentFeeDetail student) { try { FeesController obj = new FeesController(); var response = obj.Put(AdmissionNo, student); return(Json(response, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { Log.Error(ex.Message.ToString()); return(null); } }
public JsonResult AddStudentFeeDetail(StudentFeeDetail stFeeDetail) { try { FeesController obj = new FeesController(); var response = obj.Post(stFeeDetail); return(Json(((SchoolApi.StudentFeeDetail)(((System.Net.Http.ObjectContent)(response.Content)).Value)), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { Log.Error(ex.Message.ToString()); return(null); } }
public API.LABURNUM.COM.StudentFeeDetail GetFeePaidDetailDuringMonthlyFeePayment(long studentId, long classId, long academicYear, long studentFeeDetailsId) { List <API.LABURNUM.COM.StudentFeeDetail> dbstudentfeeDetailList = new FrontEndApi.StudentFeeDetailApi().GetStudentFeeDetailByAdvanceSearch(new DTO.LABURNUM.COM.StudentFeeDetailModel() { StudentId = studentId, ClassId = classId, AcademicYearId = academicYear }); int index = dbstudentfeeDetailList.FindIndex(x => x.StudentFeeDetailId == studentFeeDetailsId); API.LABURNUM.COM.StudentFeeDetail dbstudentfeeDetails = new StudentFeeDetail(); if (index >= 0) { index = index + 1; dbstudentfeeDetails = dbstudentfeeDetailList[index]; } return(dbstudentfeeDetails); }
private List <API.LABURNUM.COM.StudentFeeDetail> GetStudenFeeDetails(DTO.LABURNUM.COM.StudentFeeDetailModel model) { List <API.LABURNUM.COM.StudentFeeDetail> dbstudentFeeDetails = new List <StudentFeeDetail>(); API.LABURNUM.COM.StudentFeeDetail apiSFD = new StudentFeeDetail() { MonthlyFee = model.MonthlyFee, //AnnualFunctionFee = model.AnnualFunctionFee, LateFee = model.LateFee, PendingFee = model.PendingFee, IsActive = true, CreatedOn = new Component.Utility().GetISTDateTime(), }; dbstudentFeeDetails.Add(apiSFD); return(dbstudentFeeDetails); }
private long AddStudentFeeDetail(DTO.LABURNUM.COM.StudentFeeDetailModel model) { if (model.ChequeDate.GetValueOrDefault().Year == 0001) { model.ChequeDate = null; } else { if (model.ChequePaidAmount <= 0) { model.ChequeDate = null; } } if (model.PayForTheMonth == 0) { model.PayForTheMonth = null; } API.LABURNUM.COM.StudentFeeDetail apiStudentFeeDetail = new StudentFeeDetail() { StudentId = model.StudentId, ClassId = model.ClassId, SectionId = model.SectionId, MonthlyFee = model.MonthlyFee, // AnnualFunctionFee = model.AnnualFunctionFee, CashPaidAmount = model.CashPaidAmount, BankId = model.BankId, ChequeDate = model.ChequeDate, ChequeNumber = model.ChequeNumber, ChequePaidAmount = model.ChequePaidAmount, ChequeStatus = model.ChequeStatus, LateFee = model.LateFee, PendingFee = model.PendingFee, TransportFee = model.TransportFee, DiscountAmount = model.DiscountAmount, DiscountRemarks = model.DiscountRemarks, PayForTheMonth = model.PayForTheMonth, CollectedById = model.CollectedById, AcademicYearId = model.AcademicYearId, CreatedOn = new Component.Utility().GetISTDateTime(), IsActive = true }; this._laburnum.StudentFeeDetails.Add(apiStudentFeeDetail); this._laburnum.SaveChanges(); return(apiStudentFeeDetail.StudentFeeDetailId); }
private long AddStudentFeeDetail(DTO.LABURNUM.COM.StudentFeeDetailModel model) { API.LABURNUM.COM.StudentFeeDetail apiStudentFeeDetail = new StudentFeeDetail() { StudentFeeId = model.StudentFeeId, AdmissionFee = model.AdmissionFee, AnnualCharges = model.AnnualCharges, DevelopementCharges = model.DevelopementCharges, ExamFee = model.ExamFee, MonthlyFee = model.MonthlyFee, SportsFee = model.SportsFee, CreatedOn = System.DateTime.Now, IsActive = true }; this._laburnum.StudentFeeDetails.Add(apiStudentFeeDetail); this._laburnum.SaveChanges(); return(apiStudentFeeDetail.StudentFeeDetailId); }
public StudentFeeDetail Delete(int Id) { StudentFeeDetail student = SchoolDB.StudentFeeDetails.Find(Id); if (student == null) { return(student); } SchoolDB.StudentFeeDetails.Remove(student); try { SchoolDB.SaveChanges(); } catch (DbUpdateConcurrencyException ex) { return(student); } return(student); }
//insert stFeeDetail public HttpResponseMessage Post(StudentFeeDetail stFeeDetail) { HttpRequestMessage Request = new HttpRequestMessage(); Request.Properties.Add(HttpPropertyKeys.HttpConfigurationKey, new HttpConfiguration()); if (ModelState.IsValid) { stFeeDetail.Class = Convert.ToString(_class.GetClassID(stFeeDetail.Class)); SchoolDB.StudentFeeDetails.Add(stFeeDetail); SchoolDB.SaveChanges(); stFeeDetail.Class = Convert.ToString(_class.GetClassName(stFeeDetail.Class)); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, stFeeDetail); return(response); } else { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } }
public bool Put(string AdmissionNo, StudentFeeDetail studentFeeDetail) { if (!ModelState.IsValid) { return(false); } if (AdmissionNo != studentFeeDetail.AdmissionNo) { return(false); } SchoolDB.Entry(studentFeeDetail).State = EntityState.Modified; try { SchoolDB.SaveChanges(); } catch (DbUpdateConcurrencyException ex) { return(false); } return(true); }