예제 #1
0
        public String DeleteUnidadMedida(Entity.UnidadMedida um)
        {
            List <ClsParameter> lst = new List <ClsParameter>();
            String Mensaje          = "";

            try
            {
                lst.Add(new ClsParameter("@Code_unit", um.Code_unit));
                lst.Add(new ClsParameter("@Mensaje", "", SqlDbType.VarChar, ParameterDirection.Output, 50));
                M.EjecutarSP("EliminarUMedida", ref lst);
                Mensaje = lst[1].Valor.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Mensaje);
        }
예제 #2
0
        public String ActualizarUnidadMedida(Entity.UnidadMedida um)
        {
            List <ClsParameter> lst = new List <ClsParameter>();
            String Mensaje          = "";

            try
            {
                lst.Add(new ClsParameter("@Code_unit", um.Code_unit));
                lst.Add(new ClsParameter("@Unit_name", um.Unit_name));
                lst.Add(new ClsParameter("@Description", um.Description));
                lst.Add(new ClsParameter("@Updated_at", um.updated_at));
                lst.Add(new ClsParameter("@Mensaje", "", SqlDbType.VarChar, ParameterDirection.Output, 50));
                M.EjecutarSP("ActualizarUMedida", ref lst);
                Mensaje = lst[4].Valor.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Mensaje);
        }