Пример #1
0
 public static BOEmployeeList GetEmployeeDetails()
 {
     BOEmployeeList itemObjs = null;
     var ds = spGetEmployeeDetails.ExecuteDataset();
     if (ds != null && ds.Tables[0].Rows.Count > 0)
     {
         itemObjs = new BOEmployeeList();
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             itemObjs.Add(FillData(FillDataRecord(dr), dr));
         }
     }
     return itemObjs;
 }
Пример #2
0
        public static BOEmployeeList GetEmployeeDetails()
        {
            BOEmployeeList itemObjs = null;
            var            ds       = spGetEmployeeDetails.ExecuteDataset();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                itemObjs = new BOEmployeeList();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    itemObjs.Add(FillData(FillDataRecord(dr), dr));
                }
            }
            return(itemObjs);
        }
Пример #3
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;
 }
Пример #4
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;
 }
Пример #5
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);
        }
Пример #6
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);
        }
Пример #7
0
        public static int Save(BOEmployeeList entryList, bool adding)
        {
            tblEmployee tblObj = new tblEmployee();
            DataTable   dt     = tblObj.Table();
            int         i      = 0;

            foreach (BOEmployee entry in entryList)
            {
                DataRow newRow = tblObj.Table().NewRow();

                newRow[tblEmployee.FIRSTNAME_FIELD]    = entry.FirstName;
                newRow[tblEmployee.LASTNAME_FIELD]     = entry.LastName;
                newRow[tblEmployee.EMAILADDRESS_FIELD] = entry.EmailAddress;
                newRow[tblEmployee.PASSWORD_FIELD]     = entry.Password;
                newRow[tblEmployee.EMPLOYEETYPE_FIELD] = entry.EmployeeType;
                if (entry.CreatedOn.Equals(new DateTime()))
                {
                    newRow[tblEmployee.CREATEDON_FIELD] = DBNull.Value;
                }
                else
                {
                    newRow[tblEmployee.CREATEDON_FIELD] = entry.CreatedOn;
                }
                newRow[tblEmployee.CREATEDBYID_FIELD] = entry.CreatedByID;
                if (entry.ModifiedOn.Equals(new DateTime()))
                {
                    newRow[tblEmployee.MODIFIEDON_FIELD] = DBNull.Value;
                }
                else
                {
                    newRow[tblEmployee.MODIFIEDON_FIELD] = entry.ModifiedOn;
                }
                newRow[tblEmployee.MODIFIEDBYID_FIELD] = entry.ModifiedByID;
                newRow[tblEmployee.ISACTIVE_FIELD]     = entry.IsActive;

                dt.Rows.Add(newRow);
                i++;
            }

            //if(adding): Commented out at the moment. KS 28th Aug 2012
            return(tblObj.AddToTable(dt));
            //else
            //return tblObj.UpdateTable(dt);
        }
Пример #8
0
 public static int Save(BOEmployeeList list, bool adding)
 {
    return tblEmployeeDBManager.Save(list,adding);
 }
Пример #9
0
      public static int Save(BOEmployeeList entryList, bool adding)
      {
          tblEmployee tblObj = new tblEmployee();
          DataTable dt = tblObj.Table();
          int i = 0;

          foreach(BOEmployee entry in entryList)
          {
              DataRow newRow = tblObj.Table().NewRow();

              newRow[tblEmployee.FIRSTNAME_FIELD] = entry.FirstName;
              newRow[tblEmployee.LASTNAME_FIELD] = entry.LastName;
              newRow[tblEmployee.EMAILADDRESS_FIELD] = entry.EmailAddress;
              newRow[tblEmployee.PASSWORD_FIELD] = entry.Password;
              newRow[tblEmployee.EMPLOYEETYPE_FIELD] = entry.EmployeeType;
          if(entry.CreatedOn.Equals(new DateTime()))
              newRow[tblEmployee.CREATEDON_FIELD] = DBNull.Value;
          else
              newRow[tblEmployee.CREATEDON_FIELD] = entry.CreatedOn;
              newRow[tblEmployee.CREATEDBYID_FIELD] = entry.CreatedByID;
          if(entry.ModifiedOn.Equals(new DateTime()))
              newRow[tblEmployee.MODIFIEDON_FIELD] = DBNull.Value;
          else
              newRow[tblEmployee.MODIFIEDON_FIELD] = entry.ModifiedOn;
              newRow[tblEmployee.MODIFIEDBYID_FIELD] = entry.ModifiedByID;
              newRow[tblEmployee.ISACTIVE_FIELD] = entry.IsActive;

              dt.Rows.Add(newRow);
              i++;
          }

          //if(adding): Commented out at the moment. KS 28th Aug 2012
              return tblObj.AddToTable(dt);
          //else
              //return tblObj.UpdateTable(dt);
      }
Пример #10
0
 public static int Save(BOEmployeeList list, bool adding)
 {
     return(tblEmployeeDBManager.Save(list, adding));
 }