コード例 #1
0
ファイル: ImportData.cs プロジェクト: frostitvte/SAS
    /// <summary>
    /// This method is to convert dataTable to List
    /// </summary>
    /// <param name="dtCurrency">DataTable - currency details</param>
    private List <StudentEn> ConvertToList(DataTable dtStudent)
    {
        string currencyString = string.Empty;

        try
        {
            List <StudentEn> lstStudents = new List <StudentEn>();
            StudentEn        _studentEN  = new StudentEn();


            for (int index = 0; index < dtStudent.Rows.Count; index++)
            {
                _studentEN = new StudentEn();
                if (!string.IsNullOrWhiteSpace(dtStudent.Rows[index]["MatricNo"].ToString()))
                {
                    _studentEN.MatricNo = dtStudent.Rows[index]["MatricNo"].ToString();
                    //_studentEN.StudentName = dtStudent.Rows[index]["StudentName"].ToString();
                    //_studentEN.ProgramID = dtStudent.Rows[index]["Program"].ToString();
                    //_studentEN.CurrentSemester =Convert.ToInt32(dtStudent.Rows[index]["Semester"].ToString());
                    _studentEN.ICNo = dtStudent.Rows[index]["ICNo"].ToString();
                    //_studentEN.TransactionAmount = Convert.ToDouble(dtStudent.Rows[index]["AllocatedAmount"]);
                    _studentEN.TempPaidAmount = Convert.ToDouble(dtStudent.Rows[index]["SponsorAmount"]);
                    lstStudents.Add(_studentEN);
                }
            }
            return(lstStudents);
        }
        catch (Exception err)
        {
            throw err;
        }
    }
コード例 #2
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
        //added by Hafiz @ 04/3/2016
        //methods for load data from sas_studentoutstanding
        public List <StudentEn> GetOutstandingForUploadedFile(List <StudentEn> list_stud)
        {
            List <StudentEn> loEnList = new List <StudentEn>();

            using (TransactionScope ts = new TransactionScope())
            {
                try
                {
                    StudentDAL loDs = new StudentDAL();

                    foreach (StudentEn argEn in list_stud)
                    {
                        StudentEn loItem = new StudentEn();

                        loItem = loDs.GetOutstandingForUploadedFile(argEn);
                        loEnList.Add(loItem);
                    }
                    ts.Complete();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }

            return(loEnList);
        }
コード例 #3
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Get List of Students with Sponsers
 /// </summary>
 /// <param name="argEn">Students Entity as an Input.Sponsor,SAKO_Code,ProgramID,Faculty and CategoryCode as Input Properties.</param>
 /// <returns>Returns List of Students</returns>
 public List <StudentEn> GetlistStudentByStudent(StudentEn argEn)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.GetlistStudentByStudent(argEn));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Get List of All Students
 /// </summary>
 /// <param name="argEn">Students Entity as an Input.MatricNo,StudentName,ICNo,ProgramId,ID and StatusRec as Input Properties.</param>
 /// <returns>Returns List of Students</returns>
 public List <StudentEn> GetListOutstandingAmtAllStud(StudentEn argEn)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.GetListOutstandingAmtAllStud(argEn));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #5
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
        /// <summary>
        /// Method to Update AFC status For Student
        /// </summary>
        /// <param name="argEn">Student Entity is an Input.</param>
        /// <returns>Returns Boolean</returns>
        //public bool UpdateAFC(StudentEn argEn)
        //{
        //        try
        //        {
        //            StudentDAL loDs = new StudentDAL();
        //            return loDs.UpdateAfc(argEn);
        //        }
        //        catch (Exception ex)
        //        {

        //            throw ex;
        //        }
        //}
        /// <summary>
        /// Method to Delete Student
        /// </summary>
        /// <param name="argEn">Student Entity is an Input.MatricNo as Input Property.</param>
        /// <returns>Returns Boolean</returns>
        public bool Delete(StudentEn argEn)
        {
            try
            {
                StudentDAL loDs = new StudentDAL();
                return(loDs.Delete(argEn));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #6
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Insert Student
 /// </summary>
 /// <param name="argEn">Student Entity is an Input.</param>
 /// <returns>Returns Boolean</returns>
 public bool Insert(StudentEn argEn)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.Insert(argEn));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #7
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Get List of Students
 /// </summary>
 /// <param name="argEn">Students Entity as an Input.</param>
 /// <returns>Returns List of Students</returns>
 public List <StudentEn> GetListBySemProgTypeProgID(StudentEn argEn)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.GetListBySemProgTypeProgID(argEn));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #8
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Get List of Students who has Outstanding amount.
 /// </summary>
 /// <param name="argEn">Students Entity as an Input.Students Program Id, Semester Properties.</param>
 /// <param name="HasToIncludeLoan">Include Loan Amount Status</param>
 /// <returns>Returns List of Students</returns>
 public List <StudentEn> GetListOutstanding(StudentEn argEn, bool HasToIncludeLoan, bool IncludeCurSem)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.GetListOutstanding(argEn, HasToIncludeLoan, IncludeCurSem));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #9
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Added by Solomon to fetch the details based on the status.
 /// </summary>
 /// <param name="argEn"></param>
 /// <returns></returns>
 public List <StudentEn> GetListByProgramForFee(StudentEn argEn)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.GetListByProgramForFee(argEn));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #10
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Check For Students
 /// </summary>
 /// <param name="argEn">Students Entity as an Input.MatricNo,StudentName,ICNo,ProgramId and Faculty as Input Properties.</param>
 /// <returns>Returns List of Students</returns>
 public List <StudentEn> CheckStudentList(StudentEn argEn)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.CheckStudentList(argEn));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #11
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Get List of Students with Sponsers (filtering sponsorship validity and student status (active & registered))
 /// </summary>
 /// <param name="argEn">Students Entity as an Input.Sponsor,SAKO_Code,ProgramID,Faculty and CategoryCode as Input Properties.</param>
 /// <returns>Returns List of Students</returns>
 public StudentEn GetStudentDetailsBySponsorAllocationWithStuValidity(StudentEn argEn)
 {
     try
     {
         StudentDAL loDs = new StudentDAL();
         return(loDs.GetStudentDetailsBySponsorAllocationWithStuValidity(argEn));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #12
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
 /// <summary>
 /// Method to Check Validation
 /// </summary>
 /// <param name="argEn">Student Entity is as Input.</param>
 /// <returns>Returns a Boolean</returns>
 public bool IsValid(StudentEn argEn)
 {
     try
     {
         if (argEn.MatricNo == null || argEn.MatricNo.ToString().Length <= 0)
         {
             throw new Exception("MatricNo Is Required!");
         }
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #13
0
        private SponsorCoverLetterEn LoadObjectDetails(IDataReader argReader)
        {
            SponsorCoverLetterEn loItem = new SponsorCoverLetterEn();
            //loItem.Code = GetValue<string>(argReader, "SASCL_Code");
            //loItem.Title = GetValue<string>(argReader, "SASCL_Title");
            //loItem.OurRef = GetValue<string>(argReader, "SASCL_OurRef");
            //loItem.YourRef = GetValue<string>(argReader, "SASCL_YourRef");
            //loItem.Message = GetValue<string>(argReader, "SASCL_Message");
            //loItem.Address = GetValue<string>(argReader, "SASCL_Address");
            //loItem.SignBy = GetValue<string>(argReader, "SASCL_SignBy");
            //loItem.Name = GetValue<string>(argReader, "SASCL_Name");
            //loItem.FromDate = GetValue<DateTime>(argReader, "SASCL_FrDate");
            //loItem.ToDate = GetValue<DateTime>(argReader, "SASCL_ToDate");
            //loItem.UpdatedBy = GetValue<string>(argReader, "SASCL_UpdatedBy");
            //loItem.UpdatedTime = GetValue<DateTime>(argReader, "SASCL_UpdatedTime");

            StudentEn stuEn = new StudentEn();

            stuEn.MatricNo           = GetValue <string>(argReader, "sasi_matricno");
            stuEn.StudentName        = GetValue <string>(argReader, "sasi_name");
            stuEn.ICNo               = GetValue <string>(argReader, "sasi_icno");
            stuEn.CurretSemesterYear = GetValue <string>(argReader, "sasi_cursemyr");
            stuEn.ProgramID          = GetValue <string>(argReader, "sasi_pgid");
            loItem.Studentacc        = stuEn;

            SponsorEn sponEn = new SponsorEn();

            sponEn.SponserCode = GetValue <string>(argReader, "sasr_code");
            //sponEn.Name = GetValue<string>(argReader, "sasr_name");
            //sponEn.Email = GetValue<string>(argReader, "sasr_email");
            //sponEn.Status = GetValue<bool>(argReader, "sasr_status");
            loItem.SponsorDetails = sponEn;

            loItem.ProgramName = GetValue <string>(argReader, "sapg_program");

            return(loItem);
        }
コード例 #14
0
ファイル: StudentBAL.cs プロジェクト: frostitvte/SAS
        /// <summary>
        /// Method to Insert Student Outstanding
        /// </summary>
        /// <param name="argEn">Student Entity is an Input.</param>
        /// <returns>Returns Boolean</returns>
        public bool UpdatingStudentOutstandingReleaseStatus(StudentEn argEn, List <StudentEn> lstStudents)
        {
            bool isInserted = false;

            using (TransactionScope ts = new TransactionScope())
            {
                try
                {
                    StudentDAL loDs = new StudentDAL();
                    loDs.UpdateStudentOutstandingStatusEmpty(argEn);
                    foreach (StudentEn argEn1 in lstStudents)
                    {
                        loDs.UpdateStudentOutstandingStatus(argEn1);
                    }
                    isInserted = true;
                    ts.Complete();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            return(isInserted);
        }