Ejemplo n.º 1
0
        private void CompanyNew_Load(object sender, EventArgs e)
        {
            InitComboBox();

            Company companyInfo = null;

            if (Mode == ScreenMode.Update)
            {
                using (CompanyController controller = new CompanyController())
                {
                    companyInfo = controller.GetCompanyInfo(CompanyID);
                }
            }

            CompanyInfo = ModelHelper.CopyToNew <Company, CompanyView>(companyInfo);
            BinSource   = new BindingSource
            {
                DataSource = CompanyInfo
            };

            SetBindingData();
            SetEnable();

            CompanyType_CheckedComboBoxEdit.RefreshEditValue();
        }
Ejemplo n.º 2
0
        private void InitComboBox()
        {
            var dataSource = MasterInfoManager.GetMasterInfo(MasterType.LoaiCongTy);

            CompanyType_CheckedComboBoxEdit.SetupLayout("Id", "Value", dataSource);
        }