public string AddEditFees(CommonFeesModal ObjCommonFeesModal) { string Status = string.Empty; Status = this.accountService.AddEditFeesService(ObjCommonFeesModal); return(Status); }
public string AddEditFeesService(CommonFeesModal ObjCommonFeesModal) { string ResultSet = null; if (!string.IsNullOrEmpty(ObjCommonFeesModal.SchoolFeeDetailId)) { ObjCommonFeesModal.AffectedDate = DateTime.Now; ObjCommonFeesModal.IsFeeChanged = true; } else { ObjCommonFeesModal.SchoolFeeDetailId = null; ObjCommonFeesModal.schooltenentId = this.userDetail.schooltenentId; ObjCommonFeesModal.FineForPayeeUid = ""; } ServiceResult ObjServiceResult = validateModalService.ValidateModalFieldsService(typeof(CommonFeesModal), ObjCommonFeesModal); DbParam[] param = new DbParam[] { new DbParam(ObjCommonFeesModal.SchoolFeeDetailId, typeof(System.String), "_schoolfeedetailid"), new DbParam(ObjCommonFeesModal.schooltenentId, typeof(System.String), "_schooltenentid"), new DbParam(ObjCommonFeesModal.Class, typeof(System.String), "_class"), new DbParam(ObjCommonFeesModal.FeeCode, typeof(System.Int32), "_feecode"), new DbParam(ObjCommonFeesModal.Amount, typeof(System.Double), "_amount"), new DbParam(ObjCommonFeesModal.IsFeeChanged, typeof(System.Boolean), "_isfeechanged"), new DbParam(ObjCommonFeesModal.NewAmount, typeof(System.Double), "_newamount"), new DbParam(ObjCommonFeesModal.AffectedDate, typeof(System.DateTime), "_effecteddate"), new DbParam(ObjCommonFeesModal.PaymentDate, typeof(System.Int32), "_paymentDate"), new DbParam(ObjCommonFeesModal.LastPaymentDate, typeof(System.String), "_lastPaymentDate"), new DbParam(ObjCommonFeesModal.LateFineAmount, typeof(System.Double), "_lateFineAmount"), new DbParam(ObjCommonFeesModal.LateFineType, typeof(System.String), "_lateFineType"), new DbParam(ObjCommonFeesModal.LateFinePerDayAmount, typeof(System.Double), "_lateFinePerDayAmount"), new DbParam(ObjCommonFeesModal.LateFinePerMonthAmount, typeof(System.Double), "_lateFinePerMonthAmount"), new DbParam(this.userDetail.UserId, typeof(System.String), "_adminid") }; DataSet ds = db.GetDataset("sp_schoolfeedetails_InsUpd", param); if (ds != null && ds.Tables.Count > 0) { ResultSet = JsonConvert.SerializeObject(ds); } else { ResultSet = JsonConvert.SerializeObject(new List <string> { "EMPTY" }); } return(ResultSet); }