예제 #1
0
 public FM_InvoiceManager()
 {
     InitializeComponent();
     cb_clientName.DataSource = sql.columnReturnData(FM_LoginScreen.conString, "ClientTable", "ClientID");
     //this.Size = new System.Drawing.Size(1200, 900);
     //this.MinimumSize = new System.Drawing.Size(1200, 900);
 }
예제 #2
0
 public FM_PrintInvoices()
 {
     InitializeComponent();
     cb_clientID.DataSource = sql.columnReturnData(FM_LoginScreen.conString, "ClientTable", "ClientID");
     SetInvoiceTable();
     SetClientInfoList();
 }
예제 #3
0
 // chanage form state when edit mode is active
 private void tickBox_editMode_CheckedChanged(object sender, EventArgs e)
 {
     // NOT editmode
     if (tickBox_editMode.Checked == false)
     {
         tickBox_editMode.BackColor = Color.White;                                                                  // white edit button (indicate not active)
         cb_clientselection.Visible = false; cb_clientselection.DataSource = null;                                  // hide combo box and set Data to null ( this is edit mode feature only )
         pnl_edit.BorderStyle       = BorderStyle.Fixed3D;                                                          // sink edit panel
         btn_save.Text       = "Save"; btn_save.BackColor = Color.PaleTurquoise;                                    // change text button text and colour
         lb_clientTitle.Text = "New Client";                                                                        // change title of form
         btn_delete.Enabled  = false; btn_delete.BackColor = Color.Gray; btn_delete.FlatStyle = FlatStyle.Standard; // change delete button state and style
         Clear_fields();                                                                                            // clear all fields ready for new client entry
     }
     else  // IS editmode
     {
         tickBox_editMode.BackColor    = Color.Red;                                                                 // red edit button ( indicate editmode is active
         cb_clientselection.Visible    = true;                                                                      // show combo box
         cb_clientselection.DataSource = sql.columnReturnData(FM_LoginScreen.conString, "ClientTable", "ClientID"); // set combo box data source
         if (cb_clientselection.Text == "")
         {
             MessageBox.Show("yep");
         }                                                                                                      // SOMETHING AROUND HERE!!!
         pnl_edit.BorderStyle = BorderStyle.FixedSingle;                                                        // unsink edit pannel
         btn_save.Text        = "Save Changes"; btn_save.BackColor = Color.Tomato;                              // change "save button" style
         lb_clientTitle.Text  = "Edit Client";                                                                  // change title of form
         btn_delete.Enabled   = true; btn_delete.BackColor = Color.Red; btn_delete.FlatStyle = FlatStyle.Popup; // change delete button state and style
     }
 }