public Task SelectARAPReport()
 {
     return(Task.Run(() =>
     {
         lst_ModelPaymentDetails_RPT = new ObservableCollection <ModelPaymentReciept_RPT>();
         string sql = "[SMS].[PaymentReport] " + this.Schoolid + ",'" + this.SelectedClass.StaticName + "','" + this.SelectedAcademicYear.StaticName + "'";
         DataTable SearchResult = DAL.Select(sql);
         foreach (DataRow dr in SearchResult.Rows)
         {
             Models.ModelPaymentReciept_RPT obj = new Models.ModelPaymentReciept_RPT();
             obj.AcademicYear = dr["AcademicYear"].ToString();
             obj.Amount = dr["PaymentRecieved"].ToString();
             obj.EnrollmentNo = dr["EnrollmentNo"].ToString();
             obj.StudentName = dr["StudentName"].ToString();
             obj.Class = dr["ClassRoom"].ToString();
             lst_ModelPaymentDetails_RPT.Add(obj);
         }
         ModelSchooldDetails objSchooldetails = new ModelSchooldDetails();
         objSchooldetails.SchoolName = Common.SchoolName;
         objSchooldetails.SchoolAddress = Common.SchoolAddress;
         objSchooldetails.SchoolLogo = @"c:\Temp\SMS\" + Common.SchoolLogo;
         lstSchoolDetails = new ObservableCollection <ModelSchooldDetails>();
         lstSchoolDetails.Add(objSchooldetails);
     }));
 }
        public Task SelectPaymentReport()
        {
            return(Task.Run(() =>
            {
                lst_ModelPaymentDetails_RPT = new ObservableCollection <ModelPaymentReciept_RPT>();
                string sql = "[SMS].[GetStudentPaymentDetails] " + PrimaryKey + "," + studentId + "," + schoolid;
                DataTable SearchResult = DAL.Select(sql);
                foreach (DataRow dr in SearchResult.Rows)
                {
                    Models.ModelPaymentReciept_RPT obj = new Models.ModelPaymentReciept_RPT();
                    obj.AcademicYear = dr["AcademicYear"].ToString();
                    obj.Amount = dr["Amount"].ToString();
                    obj.CreatedDateTime = dr["CreatedDateTime"].ToString();
                    obj.EnrollmentNo = dr["EnrollmentNo"].ToString();
                    obj.ModeOfPayment = dr["ModeofPayment"].ToString();
                    obj.PaymentType = dr["PaymentType"].ToString();
                    obj.StudentName = dr["FullName"].ToString();
                    obj.RecieptID = dr["ID"].ToString();
                    obj.Class = dr["Class"].ToString();
                    lst_ModelPaymentDetails_RPT.Add(obj);
                }

                ModelSchooldDetails objSchooldetails = new ModelSchooldDetails();
                objSchooldetails.SchoolName = Common.SchoolName;
                objSchooldetails.SchoolAddress = Common.SchoolAddress;
                objSchooldetails.SchoolLogo = @"c:\Temp\SMS\" + Common.SchoolLogo;
                lstSchoolDetails = new ObservableCollection <ModelSchooldDetails>();
                lstSchoolDetails.Add(objSchooldetails);
            }));
        }
 public Task SelectExpenseReport()
 {
     return(Task.Run(() =>
     {
         lstModelExpenseDetails_RPT = new ObservableCollection <ModelExpenseDetails_RPT>();
         string sql = "[SMS].[ExpenseReport] " + this.Schoolid + ",'" + this.SelectedMonth.StaticID + "','" + this.SelectedAcademicYear.StaticName + "'";
         DataTable SearchResult = DAL.Select(sql);
         foreach (DataRow dr in SearchResult.Rows)
         {
             Models.ModelExpenseDetails_RPT obj = new Models.ModelExpenseDetails_RPT();
             obj.AcademicYear = dr["AcademicYear"].ToString();
             obj.PaymentRecieved = dr["PaymentRecieved"].ToString();
             obj.EntityName = dr["EntityName"].ToString();
             obj.Month = dr["Month"].ToString();
             lstModelExpenseDetails_RPT.Add(obj);
         }
         ModelSchooldDetails objSchooldetails = new ModelSchooldDetails();
         objSchooldetails.SchoolName = Common.SchoolName;
         objSchooldetails.SchoolAddress = Common.SchoolAddress;
         objSchooldetails.SchoolLogo = @"c:\Temp\SMS\" + Common.SchoolLogo;
         lstSchoolDetails = new ObservableCollection <ModelSchooldDetails>();
         lstSchoolDetails.Add(objSchooldetails);
     }));
 }