public DataSet GetAll_paginacion(string empresaid, tb_me_color BE) { using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid))) { using (SqlCommand cmd = new SqlCommand("gspTb60Color_SEARCH_paginacion", cnx)) { DataSet ds = new DataSet(); { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@moduloid", SqlDbType.Char, 4).Value = BE.moduloid; cmd.Parameters.Add("@colorid", SqlDbType.Char, 3).Value = BE.colorid; cmd.Parameters.Add("@posicion", SqlDbType.VarChar, 10).Value = BE.posicion; } try { cnx.Open(); using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { da.Fill(ds); } return ds; } catch (Exception ex) { throw new Exception(ex.Message); } } } }
public bool Delete(string empresaid, tb_me_color BE) { using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid))) { using (SqlCommand cmd = new SqlCommand("gspTb60Color_DELETE", cnx)) { { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@moduloid", SqlDbType.Char, 4).Value = BE.moduloid; cmd.Parameters.Add("@colorid", SqlDbType.Char, 3).Value = BE.colorid; } try { cnx.Open(); if (cmd.ExecuteNonQuery() > 0) { return true; } else { return false; } } catch (Exception ex) { throw new Exception(ex.Message); } } } }
private DataTable Movimiento_color() { try { var Tablacolor = new DataTable("color"); var BL = new tb_me_colorBL(); var BE = new tb_me_color(); BE.moduloid = moduloid.Trim(); Tablacolor = BL.GetReport(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0]; if (Tablacolor != null) { return Tablacolor; } else { return null; } } catch (Exception ex) { return null; } }
private void ValidaColor() { if (colorid.Text.Trim().Length > 0) { var BL = new tb_me_colorBL(); var BE = new tb_me_color(); var dt = new DataTable(); BE.moduloid = modulo; BE.colorid = colorid.Text.Trim().PadLeft(3, '0'); dt = BL.GetAll(EmpresaID, BE).Tables[0]; if (dt.Rows.Count > 0) { colorid.Text = dt.Rows[0]["colorid"].ToString().Trim(); colorname.Text = dt.Rows[0]["colorname"].ToString().Trim(); } else { colorid.Text = string.Empty; colorname.Text = string.Empty; } } else { colorid.Text = string.Empty; colorname.Text = string.Empty; } }
public bool Update(string empresaid, tb_me_color BE) { return tablaDA.Update(empresaid, BE); }
public bool Insert(string empresaid, tb_me_color BE) { return tablaDA.Insert(empresaid, BE); }
public DataSet GetReport(string empresaid, tb_me_color BE) { return tablaDA.GetReport(empresaid, BE); }
public DataSet GetAll_paginacion(string empresaid, tb_me_color BE) { return tablaDA.GetAll_paginacion(empresaid, BE); }
public bool Delete(string empresaid, tb_me_color BE) { return tablaDA.Delete(empresaid, BE); }