Exemplo n.º 1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            bool             isAddNew       = true;
            wdCustomerUpdate frmCustomerNew = new wdCustomerUpdate(isAddNew);

            frmCustomerNew.StartPosition = FormStartPosition.CenterScreen;
            frmCustomerNew.ShowDialog();
            Customer_Getlist();
        }
Exemplo n.º 2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            bool             isAddNew       = false;
            wdCustomerUpdate frmCustomerNew = new wdCustomerUpdate(isAddNew);

            frmCustomerNew.txtID.Text         = dgCustomer.CurrentRow.Cells["custid"].Value.ToString();
            frmCustomerNew.txtCustName.Text   = dgCustomer.CurrentRow.Cells["custname"].Value.ToString();
            frmCustomerNew.txtCustIDCard.Text = dgCustomer.CurrentRow.Cells["idcard"].Value.ToString();
            frmCustomerNew.txtIDDate.Text     = dgCustomer.CurrentRow.Cells["idcarddate"].Value.ToString();
            frmCustomerNew.txtTax.Text        = dgCustomer.CurrentRow.Cells["tax"].Value.ToString();
            frmCustomerNew.txtTell.Text       = dgCustomer.CurrentRow.Cells["tel"].Value.ToString();
            frmCustomerNew.txtDesc.Text       = dgCustomer.CurrentRow.Cells["description"].Value.ToString();
            frmCustomerNew.txtAddr.Text       = dgCustomer.CurrentRow.Cells["address"].Value.ToString();
            string strIDdate = dgCustomer.CurrentRow.Cells["idcarddate"].Value.ToString();

            frmCustomerNew.txtIDDate.Value = DateTime.ParseExact(strIDdate, "M/d/yyyy hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture);

            frmCustomerNew.StartPosition = FormStartPosition.CenterScreen;
            frmCustomerNew.ShowDialog();
            Customer_Getlist();
        }