Exemplo n.º 1
0
Employee addEmployee(Employee employee) {
    
    employee = getEmployeeId(employee);
    employee.general = getName(employee.general);
    employee.general = getAddress(employee.general);
    employee.general = getPhone(employee.general);
    employee.general = getLevel(employee.general);
    printf("Client added successfully. %c", NEWLINE);
    
    return employee;
}
Exemplo n.º 2
0
void time_loggerFrame::OnButton11Click(wxCommandEvent& event)
{

    if(StaticText1->GetLabel()!=_T("")){
if(StaticText1->GetLabel()==_T("9999")){
    StaticText1->SetLabel(_T(""));
    settings* set_dlg = new settings(this);
    set_dlg->confi = config;
    set_dlg->set_now = &sett;
    set_dlg->conn = conn;
    set_dlg->fill_all();
    set_dlg->ShowModal();
    connect_to_db();
        }else{

    if (getEmployeeId() !=1 )
    {
    StaticText1->SetLabel(_T(""));
        login* Mylogin = new login(0);
        Mylogin->empId = empId;
        Mylogin -> empName = empName;
        Mylogin -> conn = conn;
        Mylogin->setFace();
        Mylogin->ShowModal();
        Mylogin->Destroy();
        delete Mylogin;
    }
    else
    {
    StaticText1->SetLabel(_T(""));
        wxMessageDialog* dlg = new wxMessageDialog(this, _("Sorry, but there is no such ID in our database."),_("Wrong ID"), wxOK);
        dlg->ShowModal();
        delete dlg;
    }
          }
}
}