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

            if (dt.Rows.Count > 0)
            {
                itemObjs = new BOLeaveDetailsList();
                foreach (DataRow dr in dt.Rows)
                {
                    itemObjs.Add(FillDataRecord(dr));
                }
            }
            return(itemObjs);
        }
示例#5
0
        public static BOLeaveDetailsList GetAllList()
        {
            BOLeaveDetailsList itemObjs = null;
            tblLeaveDetails    tblObj   = new tblLeaveDetails();
            DataTable          dt       = tblObj.GetAllData();

            if (dt.Rows.Count > 0)
            {
                itemObjs = new BOLeaveDetailsList();
                foreach (DataRow dr in dt.Rows)
                {
                    itemObjs.Add(FillDataRecord(dr));
                }
            }
            return(itemObjs);
        }
示例#6
0
        public static BOLeaveDetails GetItem(Int32 id)
        {
            BOLeaveDetails  itemObj = null;
            tblLeaveDetails tblObj  = new tblLeaveDetails();
            DataTable       dt      = tblObj.GetAllData(tblLeaveDetails.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);
        }