コード例 #1
0
        public static string GetRegion(string json)
        {
            //sp_sel_comuna
            MySqlConnector mysql = new MySqlConnector();

            mysql.ConnectionString = HttpContext.Current.Session["cnString"].ToString();
            mysql.AddProcedure("sp_sel_region");
            mysql.ParametersFromJson(json);

            return(mysql.ExecQuery().ToJson());
        }
コード例 #2
0
        public static string InsertProducto(string json)
        {
            if (!string.IsNullOrEmpty(json))
            {
                MySqlConnector mysql = new MySqlConnector();
                mysql.ConnectionString = HttpContext.Current.Session["cnString"].ToString();
                mysql.AddProcedure("sp_ins_detalle_producto");
                mysql.ParametersFromJson(json);

                return(mysql.ExecQuery().ToJson());
            }
            else
            {
                return("ERROR");
            }
        }