Ejemplo n.º 1
0
        private void CompanyPop_Load(object sender, EventArgs e)
        {
            string udate = string.Format("{0:yyyy-MM-dd HH:mm:ss}", today);

            txtUdate.Text = udate;
            service       = new CommonCodeService();
            common_list   = service.GetCommonCodeAll();
            {
                //사용유무
                var mCode = (from item in common_list
                             where item.common_type == "vendor_type"
                             select item).ToList();

                ComboUtil.ComboBinding <CommonVO>(cboCompanyType, mCode, "common_value", "common_name", "미선택");
            }
            {
                //사용유무
                var mCode = (from item in common_list
                             where item.common_type == "user_flag"
                             select item).ToList();

                ComboUtil.ComboBinding <CommonVO>(cboYN, mCode, "common_value", "common_name");
            }
            {
                R_service = new ResourceService();
                u_list    = R_service.GetUserAll();

                ComboUtil.ComboBinding <UserVO>(cboUser, u_list, "user_id", "user_name");
            }
            if (mode == EditMode.Update)
            {
                if (lblID.Text != "")
                {
                    CompanyDB_VO vo = R_service.GetCompanyByID(Convert.ToInt32(lblID.Text));

                    txtCodeCompany.Text = vo.company_code;
                    txtNameCompany.Text = vo.company_name;
                    cboCompanyType.Text = vo.common_name;
                    txtCEO.Text         = vo.company_ceo;
                    txtCnum.Text        = vo.company_cnum;
                    txtbtype.Text       = vo.company_btype;
                    txtGtype.Text       = vo.company_gtype;
                    cboUser.Text        = vo.user_name;
                    txtEmail.Text       = vo.company_email;
                    txtPhone.Text       = vo.company_phone;
                    txtFax.Text         = vo.company_fax;
                    cboYN.Text          = vo.company_yn;
                    txtAdmin.Text       = vo.company_uadmin;
                    txtUdate.Text       = udate;
                    txtComment.Text     = vo.company_comment;
                    txtOrder_code.Text  = vo.company_order_code;
                }
            }
        }