Example #1
0
 public static BAVMenuOpcion getNewOpcion(DataRow dr)
 {
     return(new BAVMenuOpcion()
     {
         Codigo = EntidadBase.IsInt(dr, "MD_Cod"),
         Nombre = EntidadBase.IsString(dr, "MD_Nombre"),
         CodigoPadre = EntidadBase.IsInt(dr, "MD_Cod_Padre"),
         Posicion = EntidadBase.IsInt(dr, "MD_Pos_Mostrar"),
         ManejaDinero = EntidadBase.IsString(dr, "MD_Man_Dinero"),
         Pagina = EntidadBase.IsString(dr, "MD_Pagina")
     });
 }
Example #2
0
        public static TransMaxMin getNewTransMaxMin(DataRow dr)
        {
            string      str;
            string      str1;
            string      str2;
            string      str3;
            decimal     num;
            decimal     num1;
            decimal     num2;
            decimal     num3;
            decimal     num4;
            TransMaxMin transMaxMin  = new TransMaxMin();
            TransMaxMin transMaxMin1 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Desc_Trans"))
            {
                str = (dr.IsNull("MD_Desc_Trans") ? "" : dr["MD_Desc_Trans"].ToString());
            }
            else
            {
                str = "";
            }
            transMaxMin1.MD_Desc_Trans = str;
            TransMaxMin transMaxMin2 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Cta_Administrativa1"))
            {
                str1 = (dr.IsNull("MD_Cta_Administrativa1") ? "" : dr["MD_Cta_Administrativa1"].ToString());
            }
            else
            {
                str1 = "";
            }
            transMaxMin2.MD_Cta_Administrativa1 = str1;
            TransMaxMin transMaxMin3 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Cta_administrativa2"))
            {
                str2 = (dr.IsNull("MD_Cta_administrativa2") ? "" : dr["MD_Cta_administrativa2"].ToString());
            }
            else
            {
                str2 = "";
            }
            transMaxMin3.MD_Cta_administrativa2 = str2;
            TransMaxMin transMaxMin4 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Cod_Trans"))
            {
                str3 = (dr.IsNull("MD_Cod_Trans") ? "" : dr["MD_Cod_Trans"].ToString());
            }
            else
            {
                str3 = "";
            }
            transMaxMin4.MD_Cod_Trans = str3;
            TransMaxMin transMaxMin5 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Mto_Min_Bco"))
            {
                num = (dr.IsNull("MD_Mto_Min_Bco") ? new decimal(0) : decimal.Parse(dr["MD_Mto_Min_Bco"].ToString()));
            }
            else
            {
                num = new decimal(0);
            }
            transMaxMin5.MD_Mto_Min_Bco = num;
            TransMaxMin transMaxMin6 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Mto_Max_Bco"))
            {
                num1 = (dr.IsNull("MD_Mto_Max_Bco") ? new decimal(0) : decimal.Parse(dr["MD_Mto_Max_Bco"].ToString()));
            }
            else
            {
                num1 = new decimal(0);
            }
            transMaxMin6.MD_Mto_Max_Bco = num1;
            TransMaxMin transMaxMin7 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Mto_Limite_Diario"))
            {
                num2 = (dr.IsNull("MD_Mto_Limite_Diario") ? new decimal(0) : decimal.Parse(dr["MD_Mto_Limite_Diario"].ToString()));
            }
            else
            {
                num2 = new decimal(0);
            }
            transMaxMin7.MD_Mto_Limite_Diario = num2;
            TransMaxMin transMaxMin8 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Mto_Limite_Trans"))
            {
                num3 = (dr.IsNull("MD_Mto_Limite_Trans") ? new decimal(0) : decimal.Parse(dr["MD_Mto_Limite_Trans"].ToString()));
            }
            else
            {
                num3 = new decimal(0);
            }
            transMaxMin8.MD_Mto_Limite_Trans = num3;
            TransMaxMin transMaxMin9 = transMaxMin;

            if (dr.Table.Columns.Contains("MD_Comision"))
            {
                num4 = (dr.IsNull("MD_Comision") ? new decimal(0) : decimal.Parse(dr["MD_Comision"].ToString()));
            }
            else
            {
                num4 = new decimal(0);
            }
            transMaxMin9.MD_Mto_Comision  = num4;
            transMaxMin.MD_Tipo_Seguridad = EntidadBase.IsInt(dr, "MD_Tipo_Seguridad");
            return(transMaxMin);
        }