Exemple #1
0
 private void combItemName_SelectedIndexChanged(object sender, EventArgs e)
 {
     try{
         if (dateSelect == true)
         {
             SalesWithNames.AllNamesBetweenDate(dataGridNamesSalesRecord, dateTimeFrom, combItemName.Text);
         }
         else
         {
             SalesWithNames.AllNamesBetweenDate(dataGridNamesSalesRecord, dateTimeFrom, dateTimeTo, combItemName.Text);
         }
         lblTotal.Text = string.Format("{0:00.#0}", SalesWithNames.Total);
     } catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
     }
 }
Exemple #2
0
 private void dateTimeTo_ValueChanged(object sender, EventArgs e)
 {
     dateSelect = false;
     SalesWithNames.AllNamesBetweenDate(dataGridNamesSalesRecord, dateTimeFrom, dateTimeTo);
     lblTotal.Text = string.Format("{0:00.#0}", SalesWithNames.Total);
 }