コード例 #1
0
        private void FillPage(int id)
        {
            Trigger4.App_Code.Models.CompanyModel compModel = new Trigger4.App_Code.Models.CompanyModel();
            Company comp = compModel.GetCompany(id);

            txtName.Text          = comp.Name;
            txtSymbol.Text        = comp.Symbol;
            txtAlternateName.Text = comp.AlternateName;
            txtCEO.Text           = comp.CEO;
            txtCFO.Text           = comp.CFO;
            txtIndustry.Text      = comp.Industry;
            txtIndustry2.Text     = comp.Industry2;
        }
コード例 #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Trigger4.App_Code.Models.CompanyModel model = new Trigger4.App_Code.Models.CompanyModel();
            Company c = CreateCompany();

            if (!string.IsNullOrWhiteSpace(Request.QueryString["id"]))
            {
                int id = Convert.ToInt32(Request.QueryString["id"]);
                lblResult.Text = model.UpdateCompany(id, c);
            }
            else
            {
                lblResult.Text = "Update Failed - no id";
            }
        }