public frmcompanyDialog(Company _company,frmCompany _comUi) { this.Company = _company; this._CompanyUi = _comUi; InitializeComponent(); initlizedControlValues(); }
Company AssignCompany() { try { Company _company = new Company(); _company.GroupID = txtGroupID.Text; _company.CompanyName=txtCompanyName.Text; _company.LocationCode = txtLocationCode.Text; _company.CompanyAddress = txtAddress.Text; _company.TeleNo = txtTeleNo.Text; _company.FaxNo = txtFaxNo.Text; if (isDefualtCompany.Checked == true) { _company.isDefaultCompany = true; } else { _company.isDefaultCompany = false; } return _company; } catch(Exception ex){ MessageBox.Show(ex.Message, "Error - C-0009", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; } }