Ejemplo n.º 1
0
        /// <summary>
        ///     This will not be called directly from the page. and will act like a support function for Write multi Tables to generate new master number
        /// </summary>
        /// <param name="argsCode"></param>
        /// <param name="argsType">Type value in M_NUMBERS</param>
        /// <returns>New Transaction Number</returns>
        /// <remarks></remarks>
        public string GetNewMasterNumber(string argsCode, string argsType)
        {
            var objReadData = new DbReadEngine {
                ConnectionString = ConnectionString
            };
            var ds = objReadData.ExecuteSprocDs("ezyadmin.Usp_Ezy_Common_GenNewMasterNumber",
                                                new SqlParameter("@Pvc_Code", argsCode),
                                                new SqlParameter("@Pvc_Type", argsType));

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                return(ds.Tables[0].Rows[0][0].ToString().Trim());
            }
            return(string.Empty);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     This will not be called directly from the page. and will act like a support function for Write multi Tables to generate new transaction number
        /// </summary>
        /// <param name="argsType">Type value in M_NUMBERS</param>
        /// <param name="argsBno">BNo Value in M_NUMBERS</param>
        /// <param name="argsBranch">Branch value in M_NUMBERS</param>
        /// <param name="argsBu">Bu value in M_NUMBERS</param>
        /// <param name="argsTd"></param>
        /// <param name="argsJb"></param>
        /// <returns>New Transaction Number</returns>
        /// <remarks></remarks>
        public string GetNewTrnNumber(string argsType, string argsTd, string argsBno, string argsBranch, string argsBu)
        {
            var objReadData = new DbReadEngine {
                ConnectionString = ConnectionString
            };
            var ds = objReadData.ExecuteSprocDs("ezyadmin.Usp_Ezy_Common_GenNewTransNumber",
                                                new SqlParameter("@Pvc_Type", argsType),
                                                new SqlParameter("@Pvc_Td", argsTd),
                                                new SqlParameter("@Pvc_Bno", argsBno),
                                                new SqlParameter("@Pvc_Branch", argsBranch),
                                                new SqlParameter("@Pvc_Bu", argsBu));

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                return(ds.Tables[0].Rows[0][0].ToString().Trim());
            }
            return(string.Empty);
        }