コード例 #1
0
        public string getTiposPagoV()
        {
            TiposdePagosModel model = new TiposdePagosModel();

            StringBuilder sb        = new StringBuilder();
            var           variables = "";

            foreach (KeyValuePair <string, string> pair in model.getTiposPagoV())
            {
                variables += pair.Value + ",";
            }

            if (variables.Length > 0)
            {
                variables = variables.Substring(0, variables.Length - 1);
            }
            else
            {
                variables = "";
            }

            sb.Append(variables);

            return(sb.ToString());
        }
コード例 #2
0
        public string getTiposPago()
        {
            TiposdePagosModel model = new TiposdePagosModel();

            SessionDB sesion = SessionDB.start(Request, Response, false, model.db, SESSION_BEHAVIOR.AJAX);

            if (sesion == null)
            {
                return("");
            }

            StringBuilder sb = new StringBuilder();

            sb.Append("<option></option>");
            foreach (KeyValuePair <string, string> pair in model.getTiposPago())
            {
                sb.Append("<option value=\"").Append(pair.Key).Append("\">").Append(pair.Value).Append("</option>\n");
            }
            return(sb.ToString());
        }