public bool UpdateClient(ClientEntity clientEntity)
        {
            bool result;

            Database db = DatabaseFactory.CreateDatabase(Constant.DiaryDBConnectionString);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_ClientUpdate");

            db.AddInParameter(dbCommand, "@ClientId", DbType.Guid, clientEntity.ClientId);
            db.AddInParameter(dbCommand, "@Initials", DbType.String, clientEntity.Initials);
            db.AddInParameter(dbCommand, "@Firstname", DbType.String, clientEntity.Firstname);
            db.AddInParameter(dbCommand, "@MiddleName", DbType.String, clientEntity.MiddleName);
            db.AddInParameter(dbCommand, "@LastName", DbType.String, clientEntity.LastName);
            db.AddInParameter(dbCommand, "@DOB", DbType.Date, clientEntity.DOB);
            db.AddInParameter(dbCommand, "@AddressLine1", DbType.String, clientEntity.AddressLine1);
            db.AddInParameter(dbCommand, "@AddressLine2", DbType.String, clientEntity.AddressLine2);
            db.AddInParameter(dbCommand, "@AddressLine3", DbType.String, clientEntity.AddressLine3);
            db.AddInParameter(dbCommand, "@Telephone", DbType.String, clientEntity.Telephone);
            db.AddInParameter(dbCommand, "@Fax", DbType.String, clientEntity.Fax);
            db.AddInParameter(dbCommand, "@Email", DbType.String, clientEntity.Email);
            db.AddInParameter(dbCommand, "@ContactPerson", DbType.String, clientEntity.ContactPerson);
            db.AddInParameter(dbCommand, "@UpdatedBy", DbType.Guid, clientEntity.UpdatedBy);

            db.ExecuteNonQuery(dbCommand);

            result = true;

            return result;
        }
Beispiel #2
0
 public bool UpdateClient(ClientEntity clientEntity)
 {
     return clientDao.UpdateClient(clientEntity);
 }
Beispiel #3
0
 public Guid InsertClient(ClientEntity clientEntity)
 {
     return clientDao.InsertClient(clientEntity);
 }