Exemple #1
0
        public static List <clsSwitchFee> computePerSwitchFeeReport(int intIFA_ID, string strStartDate, string strEndDate)
        {
            List <clsSwitchFee> oSwitchFeeList = new List <clsSwitchFee>();
            decimal             dTotalFee      = 0;
            SqlConnection       con            = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;
            SqlCommand          cmd            = new SqlCommand();
            SqlDataReader       dr;

            con.Open();
            cmd.Connection  = con;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "SWITCH_FeeReportGet";

            cmd.Parameters.Add("@param_intIFA_ID", System.Data.SqlDbType.Int).Value      = intIFA_ID;
            cmd.Parameters.Add("@param_StartDate", System.Data.SqlDbType.NVarChar).Value = strStartDate;
            cmd.Parameters.Add("@param_EndDate", System.Data.SqlDbType.NVarChar).Value   = strEndDate;

            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                clsSwitchFee oSwitchFee = new clsSwitchFee();
                //oSwitchFee.propSwitches = Array.ConvertAll(dr["Switches"].ToString().Split(','), s => int.Parse(s));
                oSwitchFee.propSwitches       = dr["Switches"].ToString();
                oSwitchFee.propIFA_ID         = (int)dr["IFA_ID"];
                oSwitchFee.propIFA_Name       = dr["IFA_Name"].ToString();
                oSwitchFee.propPer_Switch_Fee = (decimal)dr["Per_Switch_Fee"];
                oSwitchFee.propQuantity       = (int)dr["Quantity"];
                oSwitchFee.propStartDate      = DateTime.Parse(dr["StartDate"].ToString());
                oSwitchFee.propEndDate        = DateTime.Parse(dr["EndDate"].ToString());

                dTotalFee = dTotalFee + oSwitchFee.propFees_Due;
                oSwitchFee.propTotal_Fee = dTotalFee;
                oSwitchFeeList.Add(oSwitchFee);
            }
            return(oSwitchFeeList);
        }
Exemple #2
0
        public static List <clsSwitchFee> getSwitchFeeList()
        {
            List <clsSwitchFee> oSwitchFeeList = new List <clsSwitchFee>();
            SqlConnection       con            = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;

            SqlCommand    cmd = new SqlCommand();
            SqlDataReader dr;

            con.Open();
            cmd.Connection = con;

            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "SWITCH_FeeGet";
            cmd.Parameters.Add("@param_intIFA_ID", System.Data.SqlDbType.Int).Value = 0;

            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                clsSwitchFee oSwitchFee = new clsSwitchFee();

                oSwitchFee.propIFA_ID         = dr["IFA_ID"] == System.DBNull.Value ? 0 : int.Parse(dr["IFA_ID"].ToString());
                oSwitchFee.propIFA_Name       = dr["IFA_Username"] == System.DBNull.Value ? string.Empty : dr["IFA_Username"].ToString();
                oSwitchFee.propAnnual_Fee     = dr["Annual_Fee"] == System.DBNull.Value ? 0 : decimal.Parse(dr["Annual_Fee"].ToString());
                oSwitchFee.propPer_Switch_Fee = dr["Per_Switch_Fee"] == System.DBNull.Value ? 0 : decimal.Parse(dr["Per_Switch_Fee"].ToString());
                oSwitchFee.propAccess_Denied  = dr["Access_Denied"] == System.DBNull.Value ? false : bool.Parse(dr["Access_Denied"].ToString());

                oSwitchFeeList.Add(oSwitchFee);
            }
            dr.Close();
            cmd.Dispose();
            con.Close();
            con.Dispose();

            return(oSwitchFeeList);
        }
Exemple #3
0
        public static List<clsSwitchFee> getSwitchFeeList()
        {
            List<clsSwitchFee> oSwitchFeeList = new List<clsSwitchFee>();
            SqlConnection con = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;

            SqlCommand cmd = new SqlCommand();
            SqlDataReader dr;

            con.Open();
            cmd.Connection = con;

            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "SWITCH_FeeGet";
            cmd.Parameters.Add("@param_intIFA_ID", System.Data.SqlDbType.Int).Value = 0;

            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                clsSwitchFee oSwitchFee = new clsSwitchFee();

                oSwitchFee.propIFA_ID = dr["IFA_ID"] == System.DBNull.Value ? 0 : int.Parse(dr["IFA_ID"].ToString());
                oSwitchFee.propIFA_Name = dr["IFA_Username"] == System.DBNull.Value ? string.Empty : dr["IFA_Username"].ToString();
                oSwitchFee.propAnnual_Fee = dr["Annual_Fee"] == System.DBNull.Value ? 0 : decimal.Parse(dr["Annual_Fee"].ToString());
                oSwitchFee.propPer_Switch_Fee = dr["Per_Switch_Fee"] == System.DBNull.Value ? 0 : decimal.Parse(dr["Per_Switch_Fee"].ToString());
                oSwitchFee.propAccess_Denied = dr["Access_Denied"] == System.DBNull.Value ? false : bool.Parse(dr["Access_Denied"].ToString());

                oSwitchFeeList.Add(oSwitchFee);
            }
            dr.Close();
            cmd.Dispose();
            con.Close();
            con.Dispose();

            return oSwitchFeeList;
        }
Exemple #4
0
        public static List<clsSwitchFee> computePerSwitchFeeReport(int intIFA_ID, string strStartDate, string strEndDate)
        {
            List<clsSwitchFee> oSwitchFeeList = new List<clsSwitchFee>();
            decimal dTotalFee = 0;
            SqlConnection con = new clsSystem_DBConnection(clsSystem_DBConnection.strConnectionString.NavIntegrationDB).propConnection;
            SqlCommand cmd = new SqlCommand();
            SqlDataReader dr;

            con.Open();
            cmd.Connection = con;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "SWITCH_FeeReportGet";

            cmd.Parameters.Add("@param_intIFA_ID", System.Data.SqlDbType.Int).Value = intIFA_ID;
            cmd.Parameters.Add("@param_StartDate", System.Data.SqlDbType.NVarChar).Value = strStartDate;
            cmd.Parameters.Add("@param_EndDate", System.Data.SqlDbType.NVarChar).Value = strEndDate;

            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                clsSwitchFee oSwitchFee = new clsSwitchFee();
                //oSwitchFee.propSwitches = Array.ConvertAll(dr["Switches"].ToString().Split(','), s => int.Parse(s));
                oSwitchFee.propSwitches = dr["Switches"].ToString();
                oSwitchFee.propIFA_ID = (int)dr["IFA_ID"];
                oSwitchFee.propIFA_Name = dr["IFA_Name"].ToString();
                oSwitchFee.propPer_Switch_Fee = (decimal)dr["Per_Switch_Fee"];
                oSwitchFee.propQuantity = (int)dr["Quantity"];
                oSwitchFee.propStartDate = DateTime.Parse(dr["StartDate"].ToString());
                oSwitchFee.propEndDate = DateTime.Parse(dr["EndDate"].ToString());

                dTotalFee = dTotalFee + oSwitchFee.propFees_Due;
                oSwitchFee.propTotal_Fee = dTotalFee;
                oSwitchFeeList.Add(oSwitchFee);
            }
            return oSwitchFeeList;
        }