Esempio n. 1
0
 public List<SystemFunction> GetAll()
 {
     SystemFunctionDAC _systemFunctionComponent = new SystemFunctionDAC();
      IDataReader reader =  _systemFunctionComponent.GetAllSystemFunction().CreateDataReader();
      List<SystemFunction> _systemFunctionList = new List<SystemFunction>();
      while(reader.Read())
      {
      if(_systemFunctionList == null)
          _systemFunctionList = new List<SystemFunction>();
          SystemFunction _systemFunction = new SystemFunction();
          if(reader["SystemFunctionId"] != DBNull.Value)
              _systemFunction.SystemFunctionId = Convert.ToInt32(reader["SystemFunctionId"]);
          if(reader["Name"] != DBNull.Value)
              _systemFunction.Name = Convert.ToString(reader["Name"]);
          if(reader["IsActive"] != DBNull.Value)
              _systemFunction.IsActive = Convert.ToBoolean(reader["IsActive"]);
          if(reader["IsBackendFunction"] != DBNull.Value)
              _systemFunction.IsBackendFunction = Convert.ToBoolean(reader["IsBackendFunction"]);
          if(reader["RowGuid"] != DBNull.Value)
              _systemFunction.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _systemFunction.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _systemFunction.NewRecord = false;
      _systemFunctionList.Add(_systemFunction);
      }             reader.Close();
      return _systemFunctionList;
 }
Esempio n. 2
0
 public SystemFunction GetByID(int _systemFunctionId)
 {
     SystemFunctionDAC _systemFunctionComponent = new SystemFunctionDAC();
      IDataReader reader = _systemFunctionComponent.GetByIDSystemFunction(_systemFunctionId);
      SystemFunction _systemFunction = null;
      while(reader.Read())
      {
          _systemFunction = new SystemFunction();
          if(reader["SystemFunctionId"] != DBNull.Value)
              _systemFunction.SystemFunctionId = Convert.ToInt32(reader["SystemFunctionId"]);
          if(reader["Name"] != DBNull.Value)
              _systemFunction.Name = Convert.ToString(reader["Name"]);
          if(reader["IsActive"] != DBNull.Value)
              _systemFunction.IsActive = Convert.ToBoolean(reader["IsActive"]);
          if(reader["IsBackendFunction"] != DBNull.Value)
              _systemFunction.IsBackendFunction = Convert.ToBoolean(reader["IsBackendFunction"]);
          if(reader["RowGuid"] != DBNull.Value)
              _systemFunction.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _systemFunction.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _systemFunction.NewRecord = false;             }             reader.Close();
      return _systemFunction;
 }
Esempio n. 3
0
 public bool Insert(SystemFunction systemfunction)
 {
     int autonumber = 0;
     SystemFunctionDAC systemfunctionComponent = new SystemFunctionDAC();
     bool endedSuccessfuly = systemfunctionComponent.InsertNewSystemFunction( ref autonumber,  systemfunction.Name,  systemfunction.IsActive,  systemfunction.IsBackendFunction,  Guid.NewGuid(),  DateTime.Now);
     if(endedSuccessfuly)
     {
         systemfunction.SystemFunctionId = autonumber;
     }
     return endedSuccessfuly;
 }
Esempio n. 4
0
 public void Delete(int Original_SystemFunctionId)
 {
     SystemFunctionDAC systemfunctionComponent = new SystemFunctionDAC();
     systemfunctionComponent.DeleteSystemFunction(Original_SystemFunctionId);
 }
Esempio n. 5
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     SystemFunctionDAC systemfunctioncomponent = new SystemFunctionDAC();
     return systemfunctioncomponent.UpdateDataset(dataset);
 }
Esempio n. 6
0
 public bool Update( string Name,  bool IsActive,  bool IsBackendFunction,  Guid RowGuid,  DateTime ModifiedDate,  int Original_SystemFunctionId)
 {
     SystemFunctionDAC systemfunctionComponent = new SystemFunctionDAC();
     return systemfunctionComponent.UpdateSystemFunction( Name,  IsActive,  IsBackendFunction,  RowGuid,  DateTime.Now,  Original_SystemFunctionId);
 }
Esempio n. 7
0
 public bool Update(SystemFunction systemfunction ,int old_systemFunctionId)
 {
     SystemFunctionDAC systemfunctionComponent = new SystemFunctionDAC();
     return systemfunctionComponent.UpdateSystemFunction( systemfunction.Name,  systemfunction.IsActive,  systemfunction.IsBackendFunction,  systemfunction.RowGuid,  DateTime.Now,  old_systemFunctionId);
 }
Esempio n. 8
0
        public bool Insert( string Name,  bool IsActive,  bool IsBackendFunction,  Guid RowGuid,  DateTime ModifiedDate)
        {
            SystemFunctionDAC systemfunctionComponent = new SystemFunctionDAC();
            int SystemFunctionId = 0;

            return systemfunctionComponent.InsertNewSystemFunction( ref SystemFunctionId,  Name,  IsActive,  IsBackendFunction,  Guid.NewGuid(),  DateTime.Now);
        }