Ejemplo n.º 1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            //string[] column = { Customer_Prop.CustNum, Customer_Prop.Last_Name, Customer_Prop.Address_1, Customer_Prop.Phone_1 };
            //FrmSearch search = new FrmSearch(Customers, column);
            //search.passdata = new FrmSearch.PassData(changeState);
            //search.ShowDialog();
            string[]          column            = { Const.Customer_Prop.CustNum, Const.Customer_Prop.Last_Name, Const.Customer_Prop.Address_1, Const.Customer_Prop.Phone_1, Const.Customer_Prop.Phone_2, Const.Customer_Prop.EMail };
            FrmSearchCustomer frmSearchCustomer = new FrmSearchCustomer(Customers, column);

            if (frmSearchCustomer.ShowDialog() == DialogResult.OK)
            {
                changeState(Customers, frmSearchCustomer.RowIndex);
            }
            frmSearchCustomer.Dispose();
        }
Ejemplo n.º 2
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     //string[] column = { Customer_Prop.CustNum, Customer_Prop.Last_Name, Customer_Prop.Address_1, Customer_Prop.Phone_1 };
     //FrmSearch search = new FrmSearch(Customers, column);
     //search.passdata = new FrmSearch.PassData(changeState);
     //search.ShowDialog();
     string[] column = { Const.Customer_Prop.CustNum, Const.Customer_Prop.Last_Name, Const.Customer_Prop.Address_1, Const.Customer_Prop.Phone_1, Const.Customer_Prop.Phone_2, Const.Customer_Prop.EMail };
     FrmSearchCustomer frmSearchCustomer = new FrmSearchCustomer(Customers, column);
     if (frmSearchCustomer.ShowDialog() == DialogResult.OK)
     {
         changeState(Customers,frmSearchCustomer.RowIndex);
     }
     frmSearchCustomer.Dispose();
 }
Ejemplo n.º 3
0
 private void button50_Click(object sender, EventArgs e)
 {
     if (!Employee.CheckGrant(StaticClass.storeId, StaticClass.cashierId, Employee.CFA_AUCTION_SHIP))
     {
         return;
     }
     string[] column = { Const.Customer_Prop.CustNum, Const.Customer_Prop.Last_Name, Const.Customer_Prop.Address_1, Const.Customer_Prop.Phone_1, Const.Customer_Prop.Phone_2, Const.Customer_Prop.EMail};
     Customer.CustomerDataTable customerDataTable = getGui.GetAllCustomers();
     FrmSearchCustomer frmSearchCustomer = new FrmSearchCustomer(customerDataTable,column);
     if(frmSearchCustomer.ShowDialog() == DialogResult.OK)
     {
         DataGridViewRow selectedCustomer = frmSearchCustomer.selectRow;
         float discount = (float)selectedCustomer.Cells[15].Value / 100;
         myCash1.invoiceTotal.Rows[0]["CustNum"] = selectedCustomer.Cells[0].Value;
         myCash1.invoiceTotal.Rows[0]["Discount"] = discount;
         decimal accountBalance = (decimal)selectedCustomer.Cells[18].Value;
         string custName = selectedCustomer.Cells[2].Value.ToString();
         lbCustName.Text = custName;
         lbAccBalance.Text = String.Format("{0:0,0}", accountBalance); 
         UpdateInfo();
     }
     frmSearchCustomer.Dispose();
 }