Ejemplo n.º 1
0
        private string execute(pgmmas p)
        {
            SqlDbAccess dbAccess = new SqlDbAccess(PKDBHelper.ConnectString);
            string jsonset = string.Empty;

            if (("{SLT}").IndexOf("{" + p.rmode + "}") >= 0)
            {
                string query = @"SYS_PGMMAS_Q1";
                SqlParamCollection parameters = new SqlParamCollection();

                PKDBHelper.SqlAddParam(parameters, "@INFDS", SqlDbType.VarChar, 100, p.infds);
                PKDBHelper.SqlAddParam(parameters, "@RTNCD", SqlDbType.VarChar, 100, p.rtncd);
                PKDBHelper.SqlAddParam(parameters, "@RMODE", SqlDbType.VarChar, 20, p.rmode);
                PKDBHelper.SqlAddParam(parameters, "@USRID", SqlDbType.VarChar, 10, p.usrid);
                PKDBHelper.SqlAddParam(parameters, "@USRTY", SqlDbType.VarChar, 10, p.usrty);
                PKDBHelper.SqlAddParam(parameters, "@SYSCD", SqlDbType.VarChar, 20, p.syscd);
                PKDBHelper.SqlAddParam(parameters, "@ISMBL", SqlDbType.VarChar, 1, p.ismbl);

                DataTable  dt = dbAccess.ExecuteSpDataSet(query, parameters).Tables[0];

                if (dt.Rows.Count > 0)
                {
                    return JsonConvert.SerializeObject(dt, Formatting.Indented);
                }
                else
                {
                    return string.Empty;
                }
            }
            else
            {
                return string.Empty;
            }
        }
Ejemplo n.º 2
0
        public string GetMenu(string usrid)
        {
            pgmmas pgm = new pgmmas();
            pgm.usrid = usrid;
            pgm.usrty = "E";
            pgm.syscd = "MBL";
            pgm.ismbl = "1";
            pgm.rmode = "SLT";

            return execute(pgm);
        }