public static BOEmployeeDetails GetItem(Int32 id)
 {
     BOEmployeeDetails itemObj = null;
     tblEmployeeDetails tblObj = new tblEmployeeDetails();
     DataTable dt = tblObj.GetAllData(tblEmployeeDetails.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;
 }
 public static BOEmployeeDetailsList GetAllList(int startIndex, int length, string whereClause)
 {
     BOEmployeeDetailsList itemObjs = null;
     tblEmployeeDetails tblObj = new tblEmployeeDetails();
     DataTable dt = tblObj.GetAllData(startIndex, length, whereClause, null);
     if (dt.Rows.Count > 0)
     {
         itemObjs = new BOEmployeeDetailsList();
         foreach(DataRow dr in dt.Rows)
         {
             itemObjs.Add(FillDataRecord(dr));
         }
     }
     return itemObjs;
 }
 public static BOEmployeeDetailsList GetAllList()
 {
     BOEmployeeDetailsList itemObjs = null;
     tblEmployeeDetails tblObj = new tblEmployeeDetails();
     DataTable dt = tblObj.GetAllData();
     if (dt.Rows.Count > 0)
     {
         itemObjs = new BOEmployeeDetailsList();
         foreach(DataRow dr in dt.Rows)
         {
             itemObjs.Add(FillDataRecord(dr));
         }
     }
     return itemObjs;
 }
        public static BOEmployeeDetailsList GetAllList(int startIndex, int length, string whereClause)
        {
            BOEmployeeDetailsList itemObjs = null;
            tblEmployeeDetails    tblObj   = new tblEmployeeDetails();
            DataTable             dt       = tblObj.GetAllData(startIndex, length, whereClause, null);

            if (dt.Rows.Count > 0)
            {
                itemObjs = new BOEmployeeDetailsList();
                foreach (DataRow dr in dt.Rows)
                {
                    itemObjs.Add(FillDataRecord(dr));
                }
            }
            return(itemObjs);
        }
        public static BOEmployeeDetailsList GetAllList()
        {
            BOEmployeeDetailsList itemObjs = null;
            tblEmployeeDetails    tblObj   = new tblEmployeeDetails();
            DataTable             dt       = tblObj.GetAllData();

            if (dt.Rows.Count > 0)
            {
                itemObjs = new BOEmployeeDetailsList();
                foreach (DataRow dr in dt.Rows)
                {
                    itemObjs.Add(FillDataRecord(dr));
                }
            }
            return(itemObjs);
        }
        public static BOEmployeeDetails GetItem(Int32 id)
        {
            BOEmployeeDetails  itemObj = null;
            tblEmployeeDetails tblObj  = new tblEmployeeDetails();
            DataTable          dt      = tblObj.GetAllData(tblEmployeeDetails.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);
        }