Exemplo n.º 1
0
 public bool UpdateFromInfo(NutrienteEntityKey EntityKey, NutrienteEntityInfo EntityInfo)
 {
     try
     {
         NutrienteEntityUpdate EntityUpdate = new NutrienteEntityUpdate();
         EntityUpdate.LoadFromInfo(EntityInfo);
         return(this.Update(EntityKey, EntityUpdate));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Exemplo n.º 2
0
 public int InsertFromInfo(NutrienteEntityInfo EntityInfo)
 {
     try
     {
         NutrienteEntityInsert EntityInsert = new NutrienteEntityInsert();
         EntityInsert.LoadFromInfo(EntityInfo);
         return(this.Insert_Return_Scalar(EntityInsert));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }
Exemplo n.º 3
0
 public NutrienteEntityInfo.NutrienteEntityInfoList DataTableToListOfEntityInfo(DataTable dt)
 {
     NutrienteEntityInfo[] pArray = new NutrienteEntityInfo[dt.Rows.Count];
     try
     {
         for (int index = 0; index < dt.Rows.Count; ++index)
         {
             pArray[index] = this.DataRowToEntityInfo(dt.Rows[index]);
         }
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
     return(new NutrienteEntityInfo.NutrienteEntityInfoList(pArray));
 }
Exemplo n.º 4
0
        public NutrienteEntityInfo DataRowToEntityInfo(DataRow dr)
        {
            NutrienteEntityInfo nutrienteEntityInfo = new NutrienteEntityInfo();

            try
            {
                nutrienteEntityInfo.NutrienteId = (int)dr["NutrienteId"];
                nutrienteEntityInfo.Nombre      = Convert.IsDBNull(dr["Nombre"]) ? (string)null : (string)dr["Nombre"];
                nutrienteEntityInfo.UDMId       = Convert.IsDBNull(dr["UDMId"]) ? (string)null : (string)dr["UDMId"];
                nutrienteEntityInfo.PerteneceA  = Convert.IsDBNull(dr["PerteneceA"]) ? new int?() : (int?)dr["PerteneceA"];
                nutrienteEntityInfo.Estado      = Convert.IsDBNull(dr["Estado"]) ? (string)null : (string)dr["Estado"];
            }
            catch (Exception ex)
            {
                Helpers.Logger.Logger.LogExceptionStatic(ex);
                throw ex;
            }
            return(nutrienteEntityInfo);
        }