Пример #1
0
 public string getNombres(string user, string pass)
 {
     string usu, pas;
     DataSet set;
     SqlDataAdapter adap;
     usu = user;
     pas = pass;
     set = new DataSet();
     SqlConnection sql = new clsConexion().getConnection();
     try
     {
         sql.Open();
         SqlCommand command = new SqlCommand("USP_Usuario_Login", sql);
         command.CommandType = CommandType.StoredProcedure;
         command.Parameters.AddWithValue("@codigousu", usu);
         command.Parameters.AddWithValue("@claveusu", pas);
         adap = new SqlDataAdapter(command);
         adap.Fill(set);
         sql.Close();
     }
     catch (Exception ex)
     {
     }
     return JsonConvert.SerializeObject(set, Formatting.Indented);
 }
Пример #2
0
 public string getEntidades(string reg)
 {
     string region;
     DataSet set;
     SqlDataAdapter adap;
     region = reg;
     set = new DataSet();
     SqlConnection sql = new clsConexion().getConnection();
     try
     {
         sql.Open();
         SqlCommand command = new SqlCommand("USP_S_LISTARBANCO", sql);
         command.CommandType = CommandType.StoredProcedure;
         command.Parameters.AddWithValue("@idreg", reg);
         adap = new SqlDataAdapter(command);
         adap.Fill(set);
         sql.Close();
     }
     catch (Exception ex)
     {
     }
     return JsonConvert.SerializeObject(set, Formatting.Indented);
 }
Пример #3
0
 public string getSucursales(string identi)
 {
     string ident;
     DataSet set;
     SqlDataAdapter adap;
     ident = identi;
     set = new DataSet();
     SqlConnection sql = new clsConexion().getConnection();
     try
     {
         sql.Open();
         SqlCommand command = new SqlCommand("USP_S_SUCURSALES", sql);
         command.CommandType = CommandType.StoredProcedure;
         command.Parameters.AddWithValue("@idban", ident);
         adap = new SqlDataAdapter(command);
         adap.Fill(set);
         sql.Close();
     }
     catch (Exception ex)
     {
     }
     return JsonConvert.SerializeObject(set, Formatting.Indented);
 }