Ejemplo n.º 1
0
 public static BOEmployee GetItem(Int32 id)
 {
     BOEmployee itemObj = null;
     tblEmployee tblObj = new tblEmployee();
     DataTable dt = tblObj.GetAllData(tblEmployee.PRIMARYKEY_FIELD1 + " = " + id);
     if (dt.Rows.Count > 1)
         throw new Exception("More than one row returned");
     if (dt.Rows.Count == 1)
         itemObj = FillDataRecord(dt.Rows[0]);
     return itemObj;
 }
Ejemplo n.º 2
0
 public static BOEmployeeList GetAllList(int startIndex, int length, string whereClause)
 {
     BOEmployeeList itemObjs = null;
     tblEmployee tblObj = new tblEmployee();
     DataTable dt = tblObj.GetAllData(startIndex, length, whereClause, null);
     if (dt.Rows.Count > 0)
     {
         itemObjs = new BOEmployeeList();
         foreach(DataRow dr in dt.Rows)
         {
             itemObjs.Add(FillDataRecord(dr));
         }
     }
     return itemObjs;
 }
Ejemplo n.º 3
0
 public static BOEmployeeList GetAllList()
 {
     BOEmployeeList itemObjs = null;
     tblEmployee tblObj = new tblEmployee();
     DataTable dt = tblObj.GetAllData();
     if (dt.Rows.Count > 0)
     {
         itemObjs = new BOEmployeeList();
         foreach(DataRow dr in dt.Rows)
         {
             itemObjs.Add(FillDataRecord(dr));
         }
     }
     return itemObjs;
 }
Ejemplo n.º 4
0
        public static BOEmployeeList GetAllList(int startIndex, int length, string whereClause)
        {
            BOEmployeeList itemObjs = null;
            tblEmployee    tblObj   = new tblEmployee();
            DataTable      dt       = tblObj.GetAllData(startIndex, length, whereClause, null);

            if (dt.Rows.Count > 0)
            {
                itemObjs = new BOEmployeeList();
                foreach (DataRow dr in dt.Rows)
                {
                    itemObjs.Add(FillDataRecord(dr));
                }
            }
            return(itemObjs);
        }
Ejemplo n.º 5
0
        public static BOEmployeeList GetAllList()
        {
            BOEmployeeList itemObjs = null;
            tblEmployee    tblObj   = new tblEmployee();
            DataTable      dt       = tblObj.GetAllData();

            if (dt.Rows.Count > 0)
            {
                itemObjs = new BOEmployeeList();
                foreach (DataRow dr in dt.Rows)
                {
                    itemObjs.Add(FillDataRecord(dr));
                }
            }
            return(itemObjs);
        }
Ejemplo n.º 6
0
        public static BOEmployee GetItem(Int32 id)
        {
            BOEmployee  itemObj = null;
            tblEmployee tblObj  = new tblEmployee();
            DataTable   dt      = tblObj.GetAllData(tblEmployee.PRIMARYKEY_FIELD1 + " = " + id);

            if (dt.Rows.Count > 1)
            {
                throw new Exception("More than one row returned");
            }
            if (dt.Rows.Count == 1)
            {
                itemObj = FillDataRecord(dt.Rows[0]);
            }
            return(itemObj);
        }