コード例 #1
0
ファイル: Aircraft.cs プロジェクト: MayurPawar89/MVC_BMI
        public List <Aircraft> GetAircraftInformation(Int64 nAircraftType_ID, string sTask)
        {
            DataTable       _dt           = null;
            List <Aircraft> lstAircraft   = null;
            DBParameters    _DBParameters = new DBParameters();
            DataAccess      _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@AircraftType_ID", nAircraftType_ID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_GET_AIRCRAFT_DATA", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstAircraft = new List <Aircraft>();
                    for (int i = 0; i < _dt.Rows.Count; i++)
                    {
                        Aircraft oAircraft = new Aircraft();
                        oAircraft.SRNO           = i + 1;
                        oAircraft.AircraftTypeID = Convert.ToInt64(_dt.Rows[i]["AircraftType_ID"]);
                        oAircraft.AircraftType   = Convert.ToString(_dt.Rows[i]["AircraftType"]);
                        oAircraft.AircraftCode   = Convert.ToString(_dt.Rows[i]["AircraftCode"]);
                        lstAircraft.Add(oAircraft);
                        oAircraft.Dispose();
                        oAircraft = null;
                    }
                    //foreach (DataRow dr in _dt.Rows)
                    //{
                    //    Aircraft oAircraft = new Aircraft();
                    //    oAircraft.AircraftTypeID = Convert.ToInt64(dr["AircraftType_ID"]);
                    //    oAircraft.AircraftType = Convert.ToString(dr["AircraftType"]);
                    //    oAircraft.AircraftCode = Convert.ToString(dr["AircraftCode"]);
                    //    lstAircraft.Add(oAircraft);
                    //    oAircraft.Dispose();
                    //    oAircraft = null;
                    //}
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstAircraft);
        }
コード例 #2
0
        public List <Company> GetCompanyInformation()
        {
            DataTable      _dt           = null;
            List <Company> lstCompany    = null;
            DBParameters   _DBParameters = new DBParameters();
            DataAccess     _DataAccess   = new DataAccess();

            try
            {
                string sTask = "ONE";

                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@Company_ID", 1, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_Get_Company_Master_Data", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstCompany = new List <Company>();
                    foreach (DataRow dr in _dt.Rows)
                    {
                        Company oCompany = new Company();
                        oCompany.Company_ID      = Convert.ToInt64(dr["Company_ID"]);
                        oCompany.Company_Name    = Convert.ToString(dr["Company_Name"]);
                        oCompany.Billing_Address = Convert.ToString(dr["Billing_Address"]);
                        oCompany.GST_No          = Convert.ToString(dr["GST_No"]);
                        oCompany.PAN_No          = Convert.ToString(dr["PAN_No"]);
                        oCompany.HSN_Code        = Convert.ToString(dr["HSN_Code"]);
                        oCompany.GST_Per         = Convert.ToDouble(dr["GST_Per"]);
                        oCompany.Contact_No      = Convert.ToString(dr["Contact_No"]);
                        oCompany.Email_ID        = Convert.ToString(dr["Email_ID"]);
                        lstCompany.Add(oCompany);
                        oCompany.Dispose();
                        oCompany = null;
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstCompany);
        }
コード例 #3
0
ファイル: User.cs プロジェクト: MayurPawar89/MVC_BMI
        public bool IsValidUser(string sUserName, string sPassword, out User oUser)
        {
            bool      bIsValidUser = false;
            DataTable _dt          = null;

            oUser = null;
            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@UserName", sUserName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@Password", sPassword, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_USER_LOGIN", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    if (Convert.ToInt64(_dt.Rows[0][0]) != -1)
                    {
                        bIsValidUser = true;
                        foreach (DataRow dr in _dt.Rows)
                        {
                            oUser           = new User();
                            oUser.User_ID   = Convert.ToInt64(dr["User_ID"]);
                            oUser.Role_ID   = Convert.ToInt64(dr["Role_ID"]);
                            oUser.UserName  = Convert.ToString(dr["UserName"]);
                            oUser.Role_Name = Convert.ToString(dr["Role_Name"]);
                            oUser.FirstName = Convert.ToString(dr["FirstName"]);
                            oUser.LastName  = Convert.ToString(dr["LastName"]);
                        }
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(bIsValidUser);
        }
コード例 #4
0
ファイル: Role.cs プロジェクト: MayurPawar89/MVC_BMI
        public List <Role> GetAllRoles(Int64 nRoleID, string sTask)
        {
            DataTable    _dt           = null;
            List <Role>  lstRole       = null;
            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@Role_ID", nRoleID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_GET_USER_ROLE", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstRole = new List <Role>();
                    foreach (DataRow dr in _dt.Rows)
                    {
                        Role oRole = new Role();
                        oRole.RoleID     = Convert.ToInt64(dr["Role_ID"]);
                        oRole.RoleName   = Convert.ToString(dr["Role_Name"]);
                        oRole.RoleStatus = Convert.ToString(dr["Satus"]);
                        lstRole.Add(oRole);
                        oRole.Dispose();
                        oRole = null;
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstRole);
        }
コード例 #5
0
        private static DataTable GetBranchList(Int16 nCourseID)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nCourseID", nCourseID, ParameterDirection.Input, SqlDbType.BigInt);
                _DataAccess.Retrive("SP_SVIT_GetBranchDetails", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
コード例 #6
0
        protected void AddParameter(string name, object value, ParameterDirection direction)
        {
            SqlParameter parameter = new SqlParameter(name, value);

            parameter.Direction = direction;
            DBParameters.Add(parameter);
        }
コード例 #7
0
        protected void AddParameter(string name, ParameterDirection direction)
        {
            SqlParameter parameter = new SqlParameter();

            parameter.ParameterName = name;
            parameter.Direction     = direction;
            parameter.Size          = -1;
            DBParameters.Add(parameter);
        }
コード例 #8
0
        protected void AddParameter(string name, object value, ParameterDirection direction, byte precision, byte scale)
        {
            SqlParameter parameter = new SqlParameter(name, value);

            parameter.Direction = direction;
            parameter.Scale     = scale;
            parameter.Precision = precision;
            DBParameters.Add(parameter);
        }
コード例 #9
0
        public int InsertUpdateCompnay(Company oCompany, string sTask)
        {
            int          nResult       = 0;
            DataTable    _dt           = null;
            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                //_DBParameters.Add("@Company_ID", oCompany.Company_ID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@Company_Name", oCompany.Company_Name, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@Billing_Address", oCompany.Billing_Address, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@GST_No", oCompany.GST_No, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@PAN_No", oCompany.PAN_No, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@HSN_Code", oCompany.HSN_Code, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@GST_Per", oCompany.GST_Per, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@Contact_No", oCompany.Contact_No, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@Email_ID", oCompany.Email_ID, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP__Update_Company_Master", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    nResult = Convert.ToInt32(_dt.Rows[0][0]);
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }
            return(nResult);
        }
コード例 #10
0
ファイル: Aircraft.cs プロジェクト: MayurPawar89/MVC_BMI
        public int InsertUpdateDeleteAircraft(Aircraft oAircraft, string sTask)
        {
            int          nResult       = 0;
            DataTable    _dt           = null;
            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                //_DBParameters.Add("@Company_ID", oCompany.Company_ID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@AircraftType_ID", oAircraft.AircraftTypeID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@AircraftType", oAircraft.AircraftType, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@AircraftCode", oAircraft.AircraftCode, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_Create_Update_Aircraft_Code_Master", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    nResult = Convert.ToInt32(_dt.Rows[0][0]);
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }
            return(nResult);
        }
コード例 #11
0
ファイル: User.cs プロジェクト: MayurPawar89/MVC_BMI
        public Int32 ChangePassword(Int64 nUserID, string sCurrentPassword, string sNewPassword)
        {
            Int32     nResult = 0;
            DataTable _dt     = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@User_ID", nUserID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@CurrentPassword", sCurrentPassword, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@NewPassword", sNewPassword, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_CHANGE_PASSWORD", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    nResult = Convert.ToInt32(_dt.Rows[0][0]);
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(nResult);
        }
コード例 #12
0
        public DataTable GetAlumniInfo(string sSearchString, int nSearchCriteria)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@sSearchString", sSearchString, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@nSearchCriteria", nSearchCriteria, ParameterDirection.Input, SqlDbType.Int);
                _DataAccess.Retrive("SP_SVIT_GetSearchAlumni", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
コード例 #13
0
 protected void AddParameter(string name, object value)
 {
     DBParameters.Add(new SqlParameter(name, value));
 }
コード例 #14
0
        public List <StandData> GetStandData(DateTime dtFromDate, DateTime dtToDate, string sTask)
        {
            DataTable        _dt           = null;
            List <StandData> lstStandData  = null;
            DBParameters     _DBParameters = new DBParameters();
            DataAccess       _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@FROM_DATE_TIME", dtFromDate, ParameterDirection.Input, SqlDbType.DateTime);
                _DBParameters.Add("@TO_DATE_TIME", dtToDate, ParameterDirection.Input, SqlDbType.DateTime);
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("GET_STAND_DATA", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstStandData = new List <StandData>();
                    foreach (DataRow dr in _dt.Rows)
                    {
                        StandData oStandData = new StandData();
                        oStandData.FLIGHT_ID      = Convert.ToString(dr["FLIGHT ID"]);
                        oStandData.FLIGHT_NUMBER  = Convert.ToString(dr["FLIGHT No."]);
                        oStandData.FLIGHT_DATE    = Convert.ToDateTime(dr["FLIGHT DATE"]);
                        oStandData.AIRLINE_NAME   = Convert.ToString(dr["AIRLINE NAME"]);
                        oStandData.AIRCRAFT_REGN  = Convert.ToString(dr["AIRCRAFT REGN"]);
                        oStandData.AIRCRAFT_TYPE  = Convert.ToString(dr["AIRCRAFT TYPE"]);
                        oStandData.FLIGHT_TYPE    = Convert.ToString(dr["FLIGHT TYPE"]);
                        oStandData.STAND_NAME     = Convert.ToString(dr["STAND NAME"]);
                        oStandData.STAND_IN_DATE  = Convert.ToDateTime(dr["STAND IN DATE"]);
                        oStandData.STAND_IN_TIME  = Convert.ToString(dr["STAND IN TIME"]);
                        oStandData.STAND_OUT_DATE = Convert.ToDateTime(dr["STAND OUT DATE"]);
                        oStandData.STAND_OUT_TIME = Convert.ToString(dr["STAND OUT TIME"]);
                        if (Convert.ToString(dr["IS ASSOCIATED"]).ToLower() == "yes")
                        {
                            oStandData.PROCESSING_DONE = true;
                        }
                        else
                        {
                            oStandData.PROCESSING_DONE = false;
                        }
                        oStandData.DATA_SOURCE_TYPE = Convert.ToString(dr["DATA SOURCE"]);
                        lstStandData.Add(oStandData);
                        oStandData.Dispose();
                        oStandData = null;
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstStandData);
        }
コード例 #15
0
        public Int64 InsertUpdateStudentInfo()
        {
            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            Int64 _result = 0;
            object _val = null;
            try
            {
                _DBParameters = new DBParameters();
                _DataAccess = new DataAccess();

                _DataAccess.OpenConnection(false);

                _DBParameters.clear();
                _DBParameters.Add("@nStudentID", this.nStudentID, ParameterDirection.InputOutput, SqlDbType.BigInt);
                _DBParameters.Add("@sStudFirstName", this.sStudFirstName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudMiddleName", this.sStudMiddleName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudLastName", this.sStudLastName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudEmailID", this.sStudEmailID, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudRegistrationID", this.sStudRegistrationID, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sUserName", this.sStudUserName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sPassword", this.sStudPassword, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sCurrentYear", this.sStudCurrentYear, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@nBranchID", this.nBranchID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@dtStudDOB", this.dtStudDOB, ParameterDirection.Input, SqlDbType.DateTime);
                _DBParameters.Add("@bIsStudentActive", this.bIsStudentActive, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@nEduDtlsID", this.nEduDtlsID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@sSSCMarks", this.sSSCMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sHSCMarks", this.sHSCMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sDiplomaMarks", this.sDiplomaMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sFirstYearMarks", this.sFirstYearMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sSecondYearMarks", this.sSecondYearMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sThirdYearMarks", this.sThirdYearMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sBEMarks", this.sBEMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Execute("SP_SVIT_InsertUpdateStudent", _DBParameters, out _val);

                this.nStudentID = (Int64)_val;
                _DataAccess.CloseConnection(false);
                _result = this.nStudentID;
            }
            catch (Exception ex)
            {
                _DataAccess.CloseConnection(false);
                //MessageBox.Show("Exception: " + ex.ToString());
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                    _DBParameters = null;
                }
                if (_DataAccess != null)
                {
                    _DataAccess.Dispose();
                }
            }
            return _result;
        }
コード例 #16
0
        public Int64 InsertUpdateAlumniStudentInfo(DataTable dtFriendsDetails)
        {
            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            Int64 _result = 0;
            object _val = null;
            try
            {
                _DBParameters = new DBParameters();
                _DataAccess = new DataAccess();

                _DataAccess.OpenConnection(false);

                _DBParameters.clear();
                _DBParameters.Add("@nAlumniID", this.nAlumniID, ParameterDirection.InputOutput, SqlDbType.BigInt);
                _DBParameters.Add("@sAlumniName", this.sAlumniName, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sAdmissionYear", this.sAdmissionYear, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sPassingYear", this.sPassingYear, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@nBranchID", this.nBranchID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@sContactNo", this.sContactNo, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sAlternateContactNo", this.sAlternateContactNo, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sPersonalEmailID", this.sPersonalEmailID, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sOfficeEmailID", this.sOfficeEmailID, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sCorrespondanceAddress", this.sCorrespondanceAddress, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sPermanentAddress", this.sPermanentAddress, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sOccupation", this.sOccupation, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sDesigation", this.sDesigation, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sCompanyName", this.sCompanyName, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sCompanyAddress", this.sCompanyAddress, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sWhatsUpDetails", this.sWhatsUpDetails, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sFacebookDetails", this.sFacebookDetails, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sLinkedinDetails", this.sLinkedinDetails, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@FriendsDetails", dtFriendsDetails, ParameterDirection.Input, SqlDbType.Structured);
                _DataAccess.Execute("SP_SVIT_InsertUpdateAlumniDetails", _DBParameters, out _val);

                this.nStudentID = (Int64)_val;
                _DataAccess.CloseConnection(false);
                _result = this.nStudentID;
            }
            catch (Exception ex)
            {
                _DataAccess.CloseConnection(false);
                //MessageBox.Show("Exception: " + ex.ToString());
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                    _DBParameters = null;
                }
                if (_DataAccess != null)
                {
                    _DataAccess.Dispose();
                }
            }
            return _result;
        }
コード例 #17
0
        public DataTable GetWorkshopDetails(Int64 nBranchID = 0)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nBranchID", nBranchID, ParameterDirection.Input, SqlDbType.BigInt);
                _DataAccess.Retrive("SP_SVIT_GetWorkshopSeminar", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
コード例 #18
0
        public DataTable GetStudentDetailsByUserName(string UserName)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@sUserName", UserName, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_SVIT_GetStudentsLoginDetails", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }

            return _dt;
        }
コード例 #19
0
        public DataSet GetPaperSeminarBYStaff(Int64 nStaffID = 0)
        {
            DataSet _ds = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nStaffID", nStaffID, ParameterDirection.Input, SqlDbType.BigInt);
                _DataAccess.Retrive("SP_SVIT_GetPaperAndSeminarByStaff", _DBParameters, out _ds);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _ds;
        }
コード例 #20
0
        internal int DeleteAirline(long AIRLINE_CODE_ID, string sTask)
        {
            int          nResult       = 0;
            DataTable    _dt           = null;
            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                //_DBParameters.Add("@Company_ID", oCompany.Company_ID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@AIRLINE_CODE_ID", AIRLINE_CODE_ID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@AIRLINE_CODE", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@AIRLINE_NAME", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@DOM_MIN_USAGE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@INT_MIN_USAGE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@DOM_ROUNDINNG_OFF_VALUE", 0, ParameterDirection.Input, SqlDbType.Bit);
                _DBParameters.Add("@INT_ROUNDINNG_OFF_VALUE", 0, ParameterDirection.Input, SqlDbType.Bit);
                _DBParameters.Add("@THRESHOLD_LIMIT", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@SAP_ACCOUNT_CODE", 0, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@TAX_ACCOUNT_CODE", 0, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@FGP_N_ARR_INT_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PCA_N_ARR_INT_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@FGP_N_ARR_DOM_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PAC_N_ARR_DOM_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@FGP_N_ARR_INT_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PCA_N_ARR_INT_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@FGP_N_ARR_DOM_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PCA_N_ARR_DOM_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@FGP_T_ARR_INT_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PCA_T_ARR_INT_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@FGP_T_ARR_DOM_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PAC_T_ARR_DOM_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@FGP_T_ARR_INT_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PCA_T_ARR_INT_DEP_DOM_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@FGP_T_ARR_DOM_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);
                _DBParameters.Add("@PCA_T_ARR_DOM_DEP_INT_RATE", 0, ParameterDirection.Input, SqlDbType.Float);

                _DataAccess.Retrive("SP_Create_Update_Airline_Code_Master", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    nResult = Convert.ToInt32(_dt.Rows[0][0]);
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }
            return(nResult);
        }
コード例 #21
0
        public List <AssociationData> GetAssociationData(DateTime dtFromDate, DateTime dtToDate, string sTask)
        {
            DataTable _dt = null;
            List <AssociationData> lstAssociationData = null;
            DBParameters           _DBParameters      = new DBParameters();
            DataAccess             _DataAccess        = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@FROM_DATE_TIME", dtFromDate, ParameterDirection.Input, SqlDbType.DateTime);
                _DBParameters.Add("@TO_DATE_TIME", dtToDate, ParameterDirection.Input, SqlDbType.DateTime);
                //_DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("GET_ASSOCIATION_DATA", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstAssociationData = new List <AssociationData>();
                    foreach (DataRow dr in _dt.Rows)
                    {
                        AssociationData oAssociationData = new AssociationData();
                        //ID	AIRLN CODE	A FLTNO	D FLTNO	A FLT	D FLT	D DATE	AIRCRFT REG	AIRCFT TYPE	AIRCFT CODE	BAYNO
                        //BME NO	BME TYPE	BME ST DT	BME END DT	CONSUMPTION	BILLABLEDATA	FGP RATE	PAC RATE
                        //FGP REVENUE	PCA REVENUE	TOTAL

                        oAssociationData.CELEBINAS_ID        = Convert.ToInt64(dr["ID"]);
                        oAssociationData.AIRLN_CODE          = Convert.ToString(dr["AIRLN CODE"]);
                        oAssociationData.ARRIVAL_FLIGHT_NO   = Convert.ToString(dr["A FLTNO"]);
                        oAssociationData.FLTNO               = Convert.ToString(dr["D FLTNO"]);
                        oAssociationData.ARRIVAL_FLIGHT_TYPE = Convert.ToString(dr["A FLT"]);
                        oAssociationData.FLIGHT_TYPE         = Convert.ToString(dr["D FLT"]);
                        oAssociationData.DEP_DATE            = Convert.ToDateTime(dr["D DATE"]);
                        oAssociationData.AIRCRFT_REG         = Convert.ToString(dr["AIRCRFT REG"]);
                        oAssociationData.AIRCFT_TYPE         = Convert.ToString(dr["AIRCFT TYPE"]);
                        oAssociationData.AIRCFT_CODE         = Convert.ToString(dr["AIRCFT CODE"]);
                        oAssociationData.BAYNO               = Convert.ToString(dr["BAYNO"]);
                        oAssociationData.BME_NO              = Convert.ToString(dr["BME NO"]);
                        oAssociationData.BME_TYPE            = Convert.ToString(dr["BME TYPE"]);
                        oAssociationData.BME_ST_DT           = Convert.ToDateTime(dr["BME ST DT"]);
                        oAssociationData.BME_END_DT          = Convert.ToDateTime(dr["BME END DT"]);
                        oAssociationData.CONSUMPTION         = Convert.ToDecimal(dr["CONSUMPTION"]);
                        oAssociationData.BILLABLEDATA        = Convert.ToDecimal(dr["BILLABLEDATA"]);
                        oAssociationData.FGP_RATE_PER_PER_HR = dr["FGP RATE"] == DBNull.Value ? 0 : Convert.ToDecimal(dr["FGP RATE"]);
                        oAssociationData.PAC_RATE_PER_HR     = dr["PAC RATE"] == DBNull.Value ? 0 : Convert.ToDecimal(dr["PAC RATE"]);
                        oAssociationData.FGP_REVENUE         = dr["FGP REVENUE"] == DBNull.Value ? 0 : Convert.ToDecimal(dr["FGP REVENUE"]);
                        oAssociationData.PCA_REVENUE         = dr["PCA REVENUE"] == DBNull.Value ? 0 : Convert.ToDecimal(dr["PCA REVENUE"]);
                        oAssociationData.TOTAL               = dr["TOTAL"] == DBNull.Value ? 0 : Convert.ToDecimal(dr["TOTAL"]);
                        lstAssociationData.Add(oAssociationData);
                        oAssociationData.Dispose();
                        oAssociationData = null;
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstAssociationData);
        }
コード例 #22
0
ファイル: User.cs プロジェクト: MayurPawar89/MVC_BMI
        public int DeleteUser(Int64 nUserID, string sTask)
        {
            int          nResult       = -2;
            DataTable    _dt           = null;
            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@User_ID", nUserID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@Role_ID", 0, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@UserName", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@Password", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@LastName", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@FirstName", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@MiddelName", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@MobileNo1", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@MobileNo2", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@DOB", DateTime.MinValue.Date, ParameterDirection.Input, SqlDbType.Date);
                _DBParameters.Add("@Gender", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@EmailID", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@Address", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@ActivationStatus", "", ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@Created_By_User_ID", 0, ParameterDirection.Input, SqlDbType.BigInt);
                _DataAccess.Retrive("SP_Create_Update_User", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    nResult = Convert.ToInt32(_dt.Rows[0][0]);
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }
            return(nResult);
        }
コード例 #23
0
ファイル: User.cs プロジェクト: MayurPawar89/MVC_BMI
        public List <User> GetUserInformation(Int64 nUserID, string sTask)
        {
            DataTable    _dt           = null;
            List <User>  lstUser       = null;
            DBParameters _DBParameters = new DBParameters();
            DataAccess   _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@User_ID", nUserID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_GET_USER_DATA", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstUser = new List <User>();
                    foreach (DataRow dr in _dt.Rows)
                    {
                        User oUser = new User();
                        oUser.User_ID            = Convert.ToInt64(dr["User_ID"]);
                        oUser.Role_ID            = Convert.ToInt64(dr["Role_ID"]);
                        oUser.UserName           = Convert.ToString(dr["UserName"]);
                        oUser.Password           = Convert.ToString(dr["Password"]);
                        oUser.Role_Name          = Convert.ToString(dr["Role_Name"]);
                        oUser.FirstName          = Convert.ToString(dr["FirstName"]);
                        oUser.LastName           = Convert.ToString(dr["LastName"]);
                        oUser.MiddleName         = Convert.ToString(dr["MiddelName"]);
                        oUser.Mobile1            = Convert.ToString(dr["MobileNo1"]);
                        oUser.Mobile2            = Convert.ToString(dr["MobileNo2"]);
                        oUser.RegDate            = Convert.ToDateTime(dr["RegDate"]);
                        oUser.DOB                = Convert.ToDateTime(dr["DOB"]).Date;
                        oUser.Gender             = Convert.ToString(dr["Gender"]);
                        oUser.EmailID            = Convert.ToString(dr["EmailID"]);
                        oUser.Address            = Convert.ToString(dr["Address"]);
                        oUser.ActivationStatus   = Convert.ToString(dr["ActivationStatus"]);
                        oUser.Created_By_User_ID = Convert.ToInt64(dr["Created_By_User_ID"]);
                        oUser.Created_DateTime   = Convert.ToDateTime(dr["Created_Date_Time"]);
                        lstUser.Add(oUser);
                        oUser.Dispose();
                        oUser = null;
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstUser);
        }
コード例 #24
0
        public DataTable GetIntituteDetails(bool bIsShowInAbout)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@bIsShowInAbout", bIsShowInAbout, ParameterDirection.Input, SqlDbType.Bit);
                _DataAccess.Retrive("SP_SVIT_GetIntituteDetails", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
コード例 #25
0
        public DataTable GetLatestNEWS(int nNewsType,Boolean bIsShownOnNEWS=false)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nNewsType", nNewsType, ParameterDirection.Input, SqlDbType.Int);
                _DBParameters.Add("@bIsShowOnNEWS", bIsShownOnNEWS, ParameterDirection.Input, SqlDbType.Bit);
                _DataAccess.Retrive("SP_SVIT_GetLatestNews", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
コード例 #26
0
ファイル: BMEData.cs プロジェクト: MayurPawar89/MVC_BMI
        public List <BMEData> GetBMEData(DateTime dtFromDate, DateTime dtToDate, string sTask)
        {
            DataTable      _dt           = null;
            List <BMEData> lstBMEData    = null;
            DBParameters   _DBParameters = new DBParameters();
            DataAccess     _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@FROM_DATE_TIME", dtFromDate, ParameterDirection.Input, SqlDbType.DateTime);
                _DBParameters.Add("@TO_DATE_TIME", dtToDate, ParameterDirection.Input, SqlDbType.DateTime);
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("GET_BME_DATA", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstBMEData = new List <BMEData>();
                    Int32 count = 0;
                    foreach (DataRow dr in _dt.Rows)
                    {
                        BMEData oBMEData = new BMEData();
                        oBMEData.SrNo              = ++count;
                        oBMEData.ID                = Convert.ToInt64(dr["ID"]);
                        oBMEData.BME_ID            = Convert.ToString(dr["BME ID"]);
                        oBMEData.METER_TYPE        = Convert.ToString("");
                        oBMEData.METER_SUB_TYPE    = Convert.ToString(dr["METER TYPE"]);
                        oBMEData.METER_LOCATION    = Convert.ToString(dr["LOCATION"]);
                        oBMEData.METER_NUMBER      = Convert.ToString(dr["METER NO."]);
                        oBMEData.READING_DATE_TIME = Convert.ToDateTime(dr["READING TIME"]);
                        oBMEData.CURRENT_READING   = Convert.ToString("");
                        oBMEData.PREVIOUS_READING  = Convert.ToString("");
                        oBMEData.METER_START_TIME  = Convert.ToDateTime(dr["START TIME"]);
                        oBMEData.METER_END_TIME    = Convert.ToDateTime(dr["END TIME"]);
                        if (Convert.ToString(dr["IS ASSOCIATED"]).ToLower() == "yes")
                        {
                            oBMEData.PROCESSING_DONE = true;
                        }
                        else
                        {
                            oBMEData.PROCESSING_DONE = false;
                        }
                        oBMEData.PROCESSING_DATE_TIME = Convert.ToDateTime(DateTime.MinValue);
                        oBMEData.DATA_SOURCE_TYPE     = Convert.ToString(dr["DATA SOURCE"]);
                        lstBMEData.Add(oBMEData);
                        oBMEData.Dispose();
                        oBMEData = null;
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstBMEData);
        }
コード例 #27
0
        public List <Airline> GetAirlineInformation(Int64 nAIRLINE_CODE_ID, string sTask)
        {
            DataTable      _dt           = null;
            List <Airline> lstAirline    = null;
            DBParameters   _DBParameters = new DBParameters();
            DataAccess     _DataAccess   = new DataAccess();

            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@AIRLINE_CODE_ID", nAIRLINE_CODE_ID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@TASK", sTask, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_GET_AIRLINE_DATA", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    lstAirline = new List <Airline>();
                    Int64 count = 0;
                    foreach (DataRow dr in _dt.Rows)
                    {
                        Airline oAirline = new Airline();
                        oAirline.SRNO                       = ++count;
                        oAirline.AIRLINE_CODE_ID            = Convert.ToInt64(dr["AIRLINE_CODE_ID"]);
                        oAirline.AIRLINE_CODE               = Convert.ToString(dr["AIRLINE_CODE"]);
                        oAirline.AIRLINE_NAME               = Convert.ToString(dr["AIRLINE_NAME"]);
                        oAirline.DOM_MIN_USAGE              = Convert.ToDouble(dr["DOM_MIN_USAGE"]);
                        oAirline.INT_MIN_USAGE              = Convert.ToDouble(dr["INT_MIN_USAGE"]);
                        oAirline.DOM_ROUNDINNG_OFF_VALUE    = Convert.ToBoolean(dr["DOM_ROUNDINNG_OFF_VALUE"]);
                        oAirline.INT_ROUNDINNG_OFF_VALUE    = Convert.ToBoolean(dr["INT_ROUNDINNG_OFF_VALUE"]);
                        oAirline.THRESHOLD_LIMIT            = Convert.ToDouble(dr["THRESHOLD_LIMIT"]);
                        oAirline.SAP_ACCOUNT_CODE           = Convert.ToString(dr["SAP_ACCOUNT_CODE"]);
                        oAirline.TAX_ACCOUNT_CODE           = Convert.ToString(dr["TAX_ACCOUNT_CODE"]);
                        oAirline.FGP_N_ARR_INT_DEP_INT_RATE = Convert.ToDouble(dr["FGP_N_ARR_INT_DEP_INT_RATE"]);
                        oAirline.PCA_N_ARR_INT_DEP_INT_RATE = Convert.ToDouble(dr["PCA_N_ARR_INT_DEP_INT_RATE"]);
                        oAirline.FGP_N_ARR_DOM_DEP_DOM_RATE = Convert.ToDouble(dr["FGP_N_ARR_DOM_DEP_DOM_RATE"]);
                        oAirline.PAC_N_ARR_DOM_DEP_DOM_RATE = Convert.ToDouble(dr["PAC_N_ARR_DOM_DEP_DOM_RATE"]);
                        oAirline.FGP_N_ARR_INT_DEP_DOM_RATE = Convert.ToDouble(dr["FGP_N_ARR_INT_DEP_DOM_RATE"]);
                        oAirline.PCA_N_ARR_INT_DEP_DOM_RATE = Convert.ToDouble(dr["PCA_N_ARR_INT_DEP_DOM_RATE"]);
                        oAirline.FGP_N_ARR_DOM_DEP_INT_RATE = Convert.ToDouble(dr["FGP_N_ARR_DOM_DEP_INT_RATE"]);
                        oAirline.PCA_N_ARR_DOM_DEP_INT_RATE = Convert.ToDouble(dr["PCA_N_ARR_DOM_DEP_INT_RATE"]);
                        oAirline.FGP_T_ARR_INT_DEP_INT_RATE = Convert.ToDouble(dr["FGP_T_ARR_INT_DEP_INT_RATE"]);
                        oAirline.PCA_T_ARR_INT_DEP_INT_RATE = Convert.ToDouble(dr["PCA_T_ARR_INT_DEP_INT_RATE"]);
                        oAirline.FGP_T_ARR_DOM_DEP_DOM_RATE = Convert.ToDouble(dr["FGP_T_ARR_DOM_DEP_DOM_RATE"]);
                        oAirline.PAC_T_ARR_DOM_DEP_DOM_RATE = Convert.ToDouble(dr["PAC_T_ARR_DOM_DEP_DOM_RATE"]);
                        oAirline.FGP_T_ARR_INT_DEP_DOM_RATE = Convert.ToDouble(dr["FGP_T_ARR_INT_DEP_DOM_RATE"]);
                        oAirline.PCA_T_ARR_INT_DEP_DOM_RATE = Convert.ToDouble(dr["PCA_T_ARR_INT_DEP_DOM_RATE"]);
                        oAirline.FGP_T_ARR_DOM_DEP_INT_RATE = Convert.ToDouble(dr["FGP_T_ARR_DOM_DEP_INT_RATE"]);
                        oAirline.PCA_T_ARR_DOM_DEP_INT_RATE = Convert.ToDouble(dr["PCA_T_ARR_DOM_DEP_INT_RATE"]);

                        lstAirline.Add(oAirline);
                        oAirline.Dispose();
                        oAirline = null;
                    }
                }
            }
            catch (Exception)
            {
                if (_DataAccess != null)
                {
                    _DataAccess.RollBack(); _DataAccess.CloseConnection(false);
                }
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                }
            }

            return(lstAirline);
        }