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()); }
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"); } }