Ejemplo n.º 1
0
 public InsertAppointment(AppointmentMain main)
 {
     InitializeComponent();
     main1 = main;
     dtStart.CustomFormat = "yyyy-MM-dd HH:mm:ss";
     dtEnd.CustomFormat   = "yyyy-MM-dd HH:mm:ss";
 }
 public UpdateAppointment(List <Object> singleAppt, AppointmentMain appointmentMain)
 {
     InitializeComponent();
     main1 = appointmentMain;
     _singleAppointment   = singleAppt;
     _singleCustomer      = Controller.searchByCustomerId(int.Parse(singleAppt[1].ToString()));
     _singleAddress       = Controller.getAddressRecordByAddressId(int.Parse(_singleCustomer.Tables[0].Rows[0]["AddressId"].ToString()));
     _singleCity          = Controller.getCityRecordByCityID(int.Parse(_singleAddress.Tables[0].Rows[0]["CityId"].ToString()));
     _singleCountry       = Controller.getCountryRecordByCountryID(int.Parse(_singleCity.Tables[0].Rows[0]["CountryId"].ToString()));
     dtStart.CustomFormat = "yyyy-MM-dd HH:mm:ss";
     dtEnd.CustomFormat   = "yyyy-MM-dd HH:mm:ss";
     fillInAllFields();
 }
Ejemplo n.º 3
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     lblLoginError.Text = "";
     if (userLogin(txtUsername.Text, txtPassword.Text))
     {
         this.Hide();
         AppointmentMain appointmentMain = new AppointmentMain();
         Logging.Login(txtUsername.Text);
         appointmentMain.Show();
     }
     else
     {
         lblLoginError.Text = Properties.translations.res_login_error_message;
         txtUsername.Text   = "";
         txtPassword.Text   = "";
     }
 }