Beispiel #1
0
        private void txtCustomerName_ButtonCustomClick(object sender, EventArgs e)
        {
            frmSelectCustomer frmSelectCustomer = new frmSelectCustomer(false, "colCompanyID");

            frmSelectCustomer.BringToFront();
            frmSelectCustomer.StartPosition = FormStartPosition.CenterScreen;
            DialogResult rst = frmSelectCustomer.ShowDialog();

            if (rst == DialogResult.OK)
            {
                List <CRM_CompanyResult> rstList = frmSelectCustomer.GetSelectList <CRM_CompanyResult>();
                if (rstList != null && rstList.Count > 0)
                {
                    txtCustomerID.Text            = rstList[0].CompanyID.ToStringHasNull();
                    txtCustomerName.Text          = rstList[0].CompanyName.ToStringHasNull();
                    txtAddress.Text               = rstList[0].Address;
                    txtContact.Text               = rstList[0].ContactName;
                    txtTelephone.Text             = rstList[0].Telephone;
                    txtEmail.Text                 = rstList[0].Email;
                    txtFax.Text                   = rstList[0].Fax;
                    cboClearingForm.SelectedValue = rstList[0].ClearingForm;
                    txtClearFormDay.Text          = rstList[0].ClearFormDay.ToStringHasNull();
                    txtDeliveryAddress.Text       = rstList[0].DeliveryAddress;
                    //txtReceiveContact.Text=rstList[0]
                    //txtRecComName.Text=rstList[0]
                }
            }
        }
Beispiel #2
0
        private void txtCustomerName_ButtonCustomClick(object sender, EventArgs e)
        {
            frmSelectCustomer frmSelectCustomer = new frmSelectCustomer(false, "colCompanyID");

            frmSelectCustomer.BringToFront();
            frmSelectCustomer.StartPosition = FormStartPosition.CenterScreen;
            DialogResult rst = frmSelectCustomer.ShowDialog();

            if (rst == DialogResult.OK)
            {
                List <CRM_CompanyResult> rstList = frmSelectCustomer.GetSelectList <CRM_CompanyResult>();
                if (rstList != null && rstList.Count > 0)
                {
                    txtCustomerID.Text   = rstList[0].CompanyID.ToStringHasNull();
                    txtCustomerName.Text = rstList[0].CompanyName.ToStringHasNull();
                }
            }
        }