Esempio n. 1
0
        public int SaveExpenses(ExpensesModel model)
        {
            int result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@AutoExpensesID", model.AutoExpensesID);
                    sqlService.AddParameter("@Particulars", model.Particulars);
                    sqlService.AddParameter("@ExpensesBillNo", model.ExpensesBillNo);
                    sqlService.AddParameter("@ShopName", model.ShopName);
                    sqlService.AddParameter("@Quantity", model.Quantity);
                    sqlService.AddParameter("@Amount", model.Amount);
                    sqlService.AddParameter("@PaymentMode", model.PaymentMode);
                    sqlService.AddParameter("@PurchasesDate", model.PurchasesDate);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_SaveExpenses");
                    result = (int)((short)sqlService.Parameters["@Result"].Value);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short DepositMonthlyFee(MonthlyFeeDepositModel monthlyFeeDeposit)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@ReceiptNo", monthlyFeeDeposit.FeeReceiptNo);
                    sqlService.AddParameter("@AmountDeposit", monthlyFeeDeposit.AmountDeposit);
                    sqlService.AddParameter("@AmountDues", monthlyFeeDeposit.AmountDues);
                    sqlService.AddParameter("@FeeDepositDate", monthlyFeeDeposit.FeeDepositDate);
                    sqlService.AddParameter("@FineDetailsXML", monthlyFeeDeposit.FineDetailsXML);
                    sqlService.AddParameter("@Student_ID", monthlyFeeDeposit.Student_ID);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_DepositFee");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 3
0
        public short SaveClassFeeSetting(Class_Fee_Setting_Model classFeeSettingModels)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@ClassFeeID", classFeeSettingModels.ClassFeeID);
                    sqlService.AddParameter("@ClassID", classFeeSettingModels.ClassID);
                    sqlService.AddParameter("@FeeTypeID", classFeeSettingModels.FeeTypeID);
                    sqlService.AddParameter("@FeeAmount", classFeeSettingModels.FeeAmount);
                    sqlService.AddParameter("@Active", classFeeSettingModels.Active);
                    sqlService.AddParameter("@IsApplicableOnStaffChild", classFeeSettingModels.IsApplicableOnStaffChild);
                    sqlService.AddParameter("@AmountForStaffChild", classFeeSettingModels.AmountForStaffChild);
                    sqlService.AddParameter("@Academic_Year", classFeeSettingModels.AcademicYear);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_SaveClassFeeSetting");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 4
0
        public short Save_Student_Fee_Info(long Student_ID, long?Receipt_No, string Student_Fee_Info_Type_Code, int Academic_Year, string MonthValuesDelimiterSeprated, int?Half_Tution_Fee_Amount)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Student_ID", Student_ID);
                    sqlService.AddParameter("@Months_Comma_Seprated", MonthValuesDelimiterSeprated);
                    sqlService.AddParameter("@Academic_Year", Academic_Year);
                    sqlService.AddParameter("@Receipt_No", Receipt_No);
                    sqlService.AddParameter("@Student_Fee_Info_Type_Code", Student_Fee_Info_Type_Code);
                    sqlService.AddParameter("@Half_Tution_Fee_Amount", Half_Tution_Fee_Amount);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Save_Student_Fee_Info");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short USP_Save_Student_TC_Info(Student_TC_Model_Info model)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Sequence_No", model.Sequence_No);
                    sqlService.AddParameter("@Student_ID", model.Student_ID);
                    sqlService.AddParameter("@Reason_ID", model.Reason_ID);
                    sqlService.AddParameter("@TC_Number", model.TC_Number);
                    sqlService.AddParameter("@TC_Date", model.TC_Date);
                    sqlService.AddParameter("@Academic_Year", model.Academic_Year);
                    sqlService.AddParameter("@TC_Fee_Amount", model.TC_Fee_Amount);
                    sqlService.AddOutputParameter("@Result_OUT", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Save_Student_TC_Info");
                    result = (short)sqlService.Parameters["@Result_OUT"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 6
0
        public short Save_Admission_Fee(long Student_ID, long?Sequence_No_Student_Fee_Info, string Fee_Details_XML, int Academic_Year, string MonthValuesDelimiterSeprated, DateTime Admission_Fee_Date)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Student_ID", Student_ID);
                    sqlService.AddParameter("@Sequence_No_Student_Fee_Info", Sequence_No_Student_Fee_Info);
                    sqlService.AddParameter("@Fee_Details_XML", Fee_Details_XML);
                    sqlService.AddParameter("@Months_Comma_Seprated", MonthValuesDelimiterSeprated);
                    sqlService.AddParameter("@Academic_Year", Academic_Year);
                    sqlService.AddParameter("@Admission_Fee_Date", Admission_Fee_Date);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Save_Admission_Fee");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short SaveSchoolDetails(SchoolModel schoolModel)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@SchoolID", schoolModel.SchoolID);
                    sqlService.AddParameter("@SchoolName", schoolModel.SchoolName);
                    sqlService.AddParameter("@Address", schoolModel.Address);
                    sqlService.AddParameter("@PhoneNo", schoolModel.PhoneNo);
                    sqlService.AddParameter("@ESTD", schoolModel.ESTD);
                    sqlService.AddParameter("@AffiliationNo", schoolModel.AffiliationNo);
                    sqlService.AddParameter("@SchoolNo", schoolModel.SchoolNo);
                    sqlService.AddParameter("@SchoolLogo", schoolModel.SchoolLogo);
                    sqlService.AddParameter("@IsReAdmission", schoolModel.IsReAdmission);
                    sqlService.AddParameter("@ReAdmissionAmount", schoolModel.ReAdmissionAmount);
                    sqlService.AddParameter("@FormTextLine1", schoolModel.FormTextLine1);
                    sqlService.AddParameter("@FormTextLine2", schoolModel.FormTextLine2);
                    sqlService.AddParameter("@FormTextLine3", schoolModel.FormTextLine3);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_SaveSchoolDetails");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 8
0
 public void Check_Is_Fee_Setting_Is_Saved(int Academic_Year, out string Is_Fee_Setting_Saved, out string Is_Class_Fee_Setting_Saved)
 {
     try
     {
         using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
         {
             sqlService.AddParameter("@Academic_Year", Academic_Year);
             sqlService.AddOutputParameter("@Is_Fee_Setting_Saved", SqlDbType.Char, DBNull.Value, 1);
             sqlService.AddOutputParameter("@Is_Class_Fee_Setting_Saved", SqlDbType.Char, DBNull.Value, 1);
             sqlService.ExecuteSPNonQuery("dbo.USP_Check_Is_Fee_Setting_Is_Saved");
             Is_Fee_Setting_Saved       = (string)sqlService.Parameters["@Is_Fee_Setting_Saved"].Value;
             Is_Class_Fee_Setting_Saved = (string)sqlService.Parameters["@Is_Class_Fee_Setting_Saved"].Value;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 9
0
        public short SaveStudentDetails(StudentViewModel studentViewModel)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@StudentID", studentViewModel.StudentModel.StudentID);
                    sqlService.AddParameter("@AddressID", studentViewModel.AddressModel.AddressID);
                    sqlService.AddParameter("@ExSchoolID", studentViewModel.ExSchoolModel.ExSchoolID);
                    sqlService.AddParameter("@RegistrationNo", studentViewModel.StudentModel.RegistrationNo);
                    sqlService.AddParameter("@FirstName", studentViewModel.StudentModel.FirstName);
                    sqlService.AddParameter("@MiddleName", studentViewModel.StudentModel.MiddleName);
                    sqlService.AddParameter("@LastName", studentViewModel.StudentModel.LastName);
                    sqlService.AddParameter("@BirthDate", studentViewModel.StudentModel.BirthDate);
                    sqlService.AddParameter("@RegistrationDate", studentViewModel.StudentModel.RegistrationDate);
                    sqlService.AddParameter("@GenderID", studentViewModel.StudentModel.GenderID);
                    sqlService.AddParameter("@FatherName", studentViewModel.StudentModel.FatherName);
                    sqlService.AddParameter("@MotherName", studentViewModel.StudentModel.MotherName);
                    sqlService.AddParameter("@IsTcSubmit", studentViewModel.StudentModel.IsTcSubmit);
                    sqlService.AddParameter("@IsStaffChild", studentViewModel.StudentModel.IsStaffChild);
                    sqlService.AddParameter("@IsActive", studentViewModel.StudentModel.IsActive);
                    sqlService.AddParameter("@Address", studentViewModel.AddressModel.Address);
                    sqlService.AddParameter("@Pincode", studentViewModel.AddressModel.Pincode);
                    sqlService.AddParameter("@LandlineNumber", studentViewModel.AddressModel.LandlineNumber);
                    sqlService.AddParameter("@MobileNo1", studentViewModel.AddressModel.MobileNo1);
                    sqlService.AddParameter("@MobileNo2", studentViewModel.AddressModel.MobileNo2);
                    sqlService.AddParameter("@ExSchoolName", studentViewModel.ExSchoolModel.SchoolName);
                    sqlService.AddParameter("@ExSchoolTCNumber", studentViewModel.ExSchoolModel.TCNumber);
                    sqlService.AddParameter("@EnrollmentClassID", studentViewModel.ExSchoolModel.EnrollmentClass);
                    sqlService.AddParameter("@ExSchoolAddress", studentViewModel.ExSchoolModel.Address);
                    sqlService.AddParameter("@ExSchoolContactNo", studentViewModel.ExSchoolModel.ContactNo);
                    sqlService.AddParameter("@CurrentClass", studentViewModel.StudentModel.CurrentClass);
                    sqlService.AddParameter("@CurrentSection", studentViewModel.StudentModel.CurrentSection);
                    sqlService.AddParameter("@ExSchoolTCImage", (studentViewModel.ExSchoolModel.TCImage == null) ? SqlBinary.Null : studentViewModel.ExSchoolModel.TCImage);
                    sqlService.AddParameter("@StudentImage", (studentViewModel.StudentModel.StudentImage == null) ? SqlBinary.Null : studentViewModel.StudentModel.StudentImage);
                    sqlService.AddParameter("@TCFileType", studentViewModel.ExSchoolModel.TCFileType);
                    sqlService.AddParameter("@CountryID", studentViewModel.StudentModel.CountryID);
                    sqlService.AddParameter("@ReligionID", studentViewModel.StudentModel.ReligionID);
                    sqlService.AddParameter("@CasteID", studentViewModel.StudentModel.CasteID);
                    sqlService.AddParameter("@TransportRouteID", studentViewModel.StudentModel.TransportRouteID);
                    sqlService.AddParameter("@Is_RTE_Student", studentViewModel.StudentModel.Is_RTE_Student);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Save_Registration_Details");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public string IsMonthlyFeeGenerated(int CrrentAcademicYear, out int LastMonthNo)
        {
            string text = string.Empty;
            string result;

            using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
            {
                sqlService.AddParameter("@Academic_Year", CrrentAcademicYear);
                sqlService.AddOutputParameter("@Last_Month_No", SqlDbType.SmallInt);
                text        = sqlService.ExecuteSPScalar("dbo.USP_IsMonthlyFeeGenerated");
                LastMonthNo = (int)((short)sqlService.Parameters["@Last_Month_No"].Value);
                result      = text;
            }
            return(result);
        }
Esempio n. 11
0
 public string Update_SMS_Status_All_Class(string SMS_ID)
 {
     try
     {
         using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
         {
             sqlService.AddParameter("@SMS_ID", SMS_ID);
             sqlService.AddOutputParameter("@Result_OUT", SqlDbType.VarChar, 10);
             sqlService.ExecuteSPNonQuery("dbo.USP_Update_SMS_Status_All_Class");
             return((string)sqlService.Parameters["@Result_OUT"].Value);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 12
0
 public void Check_Class_Fee_Setting_For_Previous_Academic_Year(int Academic_Year, out string Is_Record_Exists_Out)
 {
     try
     {
         using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
         {
             sqlService.AddParameter("@Academic_Year", Academic_Year);
             sqlService.AddOutputParameter("@Is_Record_Exists_OUT", SqlDbType.Char, DBNull.Value, 1);
             sqlService.ExecuteSPNonQuery("dbo.USP_CHECK_CLASS_FEE_SETTING_FOR_PREVIOUS_ACADEMIC_YEAR");
             Is_Record_Exists_Out = (string)sqlService.Parameters["@Is_Record_Exists_OUT"].Value;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 13
0
 public string Log_SMS_Individual(string Mobile_Number, string SMS_Text)
 {
     try
     {
         using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
         {
             sqlService.AddParameter("@SMS_Text", SMS_Text);
             sqlService.AddParameter("@Mobile_Number", Mobile_Number);
             sqlService.AddOutputParameter("@Result_OUT", SqlDbType.VarChar, 10);
             sqlService.ExecuteSPNonQuery("dbo.USP_Log_SMS_Individual");
             return((string)sqlService.Parameters["@Result_OUT"].Value);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public string Is_Valid_Fee_Receipt_No(long Fee_Receipt_No_IN)
        {
            string result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Fee_Receipt_No_IN", Fee_Receipt_No_IN);
                    sqlService.AddOutputParameter("@Return_OUT", SqlDbType.Char, DBNull.Value, 1);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Is_Valid_Fee_Receipt_No");
                    result = (string)sqlService.Parameters["@Return_OUT"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short SavePurchasesFee(string purchasesFeeXML)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@PurchasesFeeXML", purchasesFeeXML);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_SavePurchasesFee");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 16
0
        public short Copy_Class_Fee_Setting(int Academic_Year)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Academic_Year", Academic_Year);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.Usp_Copy_Class_Fee_Setting");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 17
0
        public int DeleteExpenses(long ExpensesID)
        {
            int result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@AutoExpensesID", ExpensesID);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_DeleteExpenses");
                    result = (int)((short)sqlService.Parameters["@Result"].Value);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 18
0
        public short Delete_Advance_Pay(long Receipt_No)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Receipt_No", Receipt_No);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Delete_Advance_Pay");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short Delete_TC_Details(long?Student_ID)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Student_ID", Student_ID);
                    sqlService.AddOutputParameter("@Result_OUT", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Delete_TC_Details");
                    result = (short)sqlService.Parameters["@Result_OUT"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short Multiple_Receipt_Fee_Paid(string Fee_Details_xml)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Fee_Details_xml_IN", Fee_Details_xml);
                    sqlService.AddOutputParameter("@Result_OUT", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Multiple_Receipt_Fee_Paid");
                    result = (short)sqlService.Parameters["@Result_OUT"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Esempio n. 21
0
        public short TakeBackUp(string filePath, string dbName)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@FilePath", filePath);
                    sqlService.AddParameter("@DBName", dbName);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_DatabaseBackUp");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short GenerateMonthlyFee(string Months, int AcademicYear)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@MonthValuesDelimiterSeprated", Months);
                    sqlService.AddParameter("@AcademicYear", AcademicYear);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_GenerateMonthlyFee_Multiple_Months");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short Update_Deposit_Date(long Fee_Transaction_ID_IN, DateTime New_Deposit_Date_IN)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@Fee_Transaction_ID_IN", Fee_Transaction_ID_IN);
                    sqlService.AddParameter("@New_Deposit_Date_IN", New_Deposit_Date_IN);
                    sqlService.AddOutputParameter("@Result_OUT", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_Update_Deposit_Date");
                    result = (short)sqlService.Parameters["@Result_OUT"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short SaveTransportRoute(TransportRouteModel transportModel)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@RouteID", transportModel.RouteID);
                    sqlService.AddParameter("@RouteName", transportModel.RouteName);
                    sqlService.AddParameter("@Amount", transportModel.Amount);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_SaveTransportRoute");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public short SaveFeeType(FeeTypeModel feeTypeModel)
        {
            short result;

            try
            {
                using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
                {
                    sqlService.AddParameter("@FeeTypeID", feeTypeModel.FeeTypeID);
                    sqlService.AddParameter("@FeeType", feeTypeModel.FeeType);
                    sqlService.AddParameter("@Active", feeTypeModel.Active);
                    sqlService.AddParameter("@IsPurchasable", feeTypeModel.IsPurchasable);
                    sqlService.AddOutputParameter("@Result", SqlDbType.SmallInt);
                    sqlService.ExecuteSPNonQuery("dbo.USP_SaveFeeType");
                    result = (short)sqlService.Parameters["@Result"].Value;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public StudentFineViewModel GetStudentFineDetails(StudentFineViewModel studentFine, out short isBillPaid)
        {
            StudentFineViewModel studentFineViewModel;

            using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
            {
                sqlService.AddParameter("@ClassID", SqlDbType.SmallInt, studentFine.ClassID);
                sqlService.AddParameter("@SectionID", SqlDbType.SmallInt, studentFine.SectionID);
                sqlService.AddParameter("@FineDate", SqlDbType.Date, studentFine.FineDate);
                sqlService.AddParameter("@FineTypeID", SqlDbType.SmallInt, studentFine.FineTypeID);
                sqlService.AddOutputParameter("@ISBillPaid", SqlDbType.SmallInt);
                using (SqlDataReader sqlDataReader = sqlService.ExecuteSPReader("dbo.USP_GetStudentFineDetails"))
                {
                    this._studentFineViewModel             = new StudentFineViewModel();
                    this._studentFineViewModel.ListStudent = sqlDataReader.MapToList <StudentFineViewModel>();
                    sqlDataReader.NextResult();
                    this._studentFineViewModel.ListStudentFine = sqlDataReader.MapToList <StudentFineViewModel>();
                    sqlDataReader.NextResult();
                    isBillPaid           = (short)sqlService.Parameters["@ISBillPaid"].Value;
                    studentFineViewModel = this._studentFineViewModel;
                }
            }
            return(studentFineViewModel);
        }