/// <summary>
        /// 기본값 (담당자,거래처,창고)를 입력하는 버튼이벤트
        /// </summary>
        private void btn_Text_Click(object sender, EventArgs e)
        {
            Form frm;

            if (((Button)sender).Name.Contains("Clerk"))
            {
                frm = new Frm_ClerkSelect();
                if (frm.ShowDialog() != DialogResult.Cancel)
                {
                    this.txt_ClerkCode.Text = ((Frm_ClerkSelect)frm).Clerk.Clerk_code;
                    this.txt_ClerkName.Text = ((Frm_ClerkSelect)frm).Clerk.Clerk_name;
                }
            }
            else if (((Button)sender).Name.Contains("Business"))
            {
                frm = new Frm_BusinessSelect();
                if (frm.ShowDialog() != DialogResult.Cancel)
                {
                    this.txt_BusinessCode.Text = ((Frm_BusinessSelect)frm).Business.Code;
                    this.txt_BusinessName.Text = ((Frm_BusinessSelect)frm).Business.Name;
                }
            }
            else if (((Button)sender).Name.Contains("Warehouse"))
            {
                frm = new Frm_WarehouseSelect();
                if (frm.ShowDialog() != DialogResult.Cancel)
                {
                    this.txt_WareCode.Text = ((Frm_WarehouseSelect)frm).Warehouse.Warehouse_code;
                    this.txt_WareName.Text = ((Frm_WarehouseSelect)frm).Warehouse.Warehouse_name;
                }
            }
        }
Example #2
0
        private void btnSearchBusiness_Click(object sender, EventArgs e)
        {
            Frm_BusinessSelect fbs = new Frm_BusinessSelect();

            if (fbs.ShowDialog() == DialogResult.OK)
            {
                txtCode.Text      = fbs.Business.Code;
                txtName.Text      = fbs.Business.Name;
                txtTel.Text       = fbs.Business.Tel;
                txtEmail.Text     = fbs.Business.Email;
                txtPresenter.Text = fbs.Business.Presenter;
            }
        }