예제 #1
0
    private void LoadData()
    {
        if (Request["ID"] == null)
        {
            return;
        }

        int id = int.Parse(Request["ID"].ToString());

        hiddenID.Text = id.ToString();
        FineOffice.Modules.CNS_CensusRelation model = relationBll.GetModel(d => d.ID == id);
        txtRelation.Text = model.Relation;
    }
예제 #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         FineOffice.Modules.CNS_CensusRelation model = new FineOffice.Modules.CNS_CensusRelation();
         model.Relation = txtRelation.Text.Trim();
         relationBll.Add(model);
         PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("subwin_close"));
     }
     catch (Exception ex)
     {
         Alert.Show(ex.Message);
     }
 }