Ejemplo n.º 1
0
 private void txtBoxQuotationNo_TextChanged(object sender, EventArgs e)
 {
     if (txtBoxQuotationNo.Text != "")
     {
         order = new VO.OrderVO();
         order.Quotation_no = Convert.ToInt32(txtBoxQuotationNo.Text);
         String[,] grabData = order.ReadParkQuoteSearch();
         try
         {
             dataGridView1.Rows.Clear();
             for (int o = 0; o < grabData.GetLength(1); o++)
             {
                 dataGridView1.Rows.Add(grabData[0, o].ToString(), Convert.ToDateTime(grabData[1, o].ToString()).ToString("MM/dd/yyyy"), Convert.ToDateTime(grabData[2, o].ToString()).ToString("hh:mm:ss tt"), Convert.ToDouble(grabData[3, o].ToString()).ToString("#,###,##0.00"), grabData[4, o].ToString());
             }
         }
         catch (Exception)
         {
             MessageBox.Show("Check Database!", "Database Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         LoadData();
     }
 }
Ejemplo n.º 2
0
 private void LoadQuoteDataItem(Int32 Quotation_no)
 {
     ordervo = new VO.OrderVO();
     ordervo.Quotation_no = Quotation_no;
     String[,] grabData   = ordervo.ReadItemQuote();
     try
     {
         for (int o = 0; o < grabData.GetLength(1); o++)
         {
             dataGridView1.Rows.Add(grabData[0, o].ToString(), grabData[1, o].ToString(), grabData[2, o].ToString(), Convert.ToDouble(grabData[3, o].ToString()).ToString("#,###,##0.00"), Convert.ToDouble(grabData[4, o].ToString()).ToString("#,###,##0.00"));
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Check Database!", "Database Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 3
0
        private void RequoteNew()
        {
            String       custcode = "";
            DialogResult dlg      = MessageBox.Show("Do you wish to Re-Quote this Quotation?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dlg == System.Windows.Forms.DialogResult.Yes)
            {
                ordervo         = new VO.OrderVO();
                ordervo.Company = dataGridView1.SelectedRows[0].Cells[3].Value.ToString();
                custcode        = ordervo.askCustomerCode();
                //
                ordervo.Quote_custcode = custcode;
                ordervo.Quote_customer = dataGridView1.SelectedRows[0].Cells[3].Value.ToString();
                ordervo.Quote_customer = dataGridView1.SelectedRows[0].Cells[4].Value.ToString();
                ordervo.NewQuotation();
            }
        }
Ejemplo n.º 4
0
 private void LoadQuoteDataItem(String date)
 {
     ordervo            = new VO.OrderVO();
     ordervo.Targetdate = presetDate;
     String[,] grabData = ordervo.ReadQuoteHistoryDateVO();
     try
     {
         for (int o = 0; o < grabData.GetLength(1); o++)
         {
             dataGridView1.Rows.Add(grabData[0, o].ToString(), Convert.ToDateTime(grabData[1, o]).ToString("MM/dd/yyyy"), Convert.ToDateTime(grabData[2, o]).ToString("hh:mm:ss tt"), grabData[3, o].ToString(), grabData[4, o].ToString(), Convert.ToDouble(grabData[5, o]).ToString("#,###,##0.00"), grabData[6, o].ToString());
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Check Database!", "Database Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 5
0
 private void LoadDataOrder()
 {
     order = new VO.OrderVO();
     String[,] grabData = order.ReadParkedOrder();
     try
     {
         dataGridView2.Rows.Clear();
         for (int o = 0; o < grabData.GetLength(1); o++)
         {
             dataGridView2.Rows.Add(grabData[0, o].ToString(), Convert.ToDateTime(grabData[1, o].ToString()).ToString("MM/dd/yyyy"), Convert.ToDateTime(grabData[2, o].ToString()).ToString("hh:mm:ss tt"), Convert.ToDouble(grabData[3, o].ToString()).ToString("#,###,##0.00"), grabData[4, o].ToString());
         }
         if (dataGridView2.Rows.Count != 0)
         {
             dataGridView2.FirstDisplayedScrollingRowIndex = dataGridView2.Rows.Count - 1;
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Check Database!", "Database Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 6
0
 private void LoadData()
 {
     ordervo           = new VO.OrderVO();
     String[,] getData = ordervo.ReadCompanySearchQuotex();
     try
     {
         collect.Clear();
         for (int n = 0; n < getData.GetLength(1); n++)
         {
             collect.Add(getData[0, n].ToString());
         }
         txtBoxCompany.AutoCompleteMode         = AutoCompleteMode.Suggest;
         txtBoxCompany.AutoCompleteSource       = AutoCompleteSource.CustomSource;
         txtBoxCompany.AutoCompleteCustomSource = collect;
         txtBoxCompany.Focus();
     }
     catch (Exception)
     {
         MessageBox.Show("Please Check your Database Server Connection", "Database Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.ExitThread();
     }
 }
Ejemplo n.º 7
0
 private void txtBoxOrderNo_TextChanged(object sender, EventArgs e)
 {
     order = new VO.OrderVO();
     try
     {
         if (txtBoxOrderNo.Text != "")
         {
             order.Pos_orderno  = Convert.ToInt32(txtBoxOrderNo.Text);
             String[,] grabData = order.ReadParkedOrderSearch();
             dataGridView1.Rows.Clear();
             for (int o = 0; o < grabData.GetLength(1); o++)
             {
                 dataGridView1.Rows.Add(grabData[0, o].ToString(), Convert.ToDateTime(grabData[1, o].ToString()).ToString("MM/dd/yyyy"), Convert.ToDateTime(grabData[2, o].ToString()).ToString("hh:mm:ss tt"), Convert.ToDouble(grabData[3, o].ToString()).ToString("#,###,##0.00"), grabData[4, o].ToString());
             }
         }
         else
         {
             LoadData();
         }
     }
     catch (Exception)
     {
     }
 }