private void LoadData() { if (Request["ID"] == null) { return; } int id = int.Parse(Request["ID"].ToString()); hiddenID.Text = id.ToString(); FineOffice.Modules.ADM_LetterChannel model = letterChannelBll.GetModel(d => d.ID == id); txtChannel.Text = model.Channel; }
protected void btnSave_Click(object sender, EventArgs e) { try { FineOffice.Modules.ADM_LetterChannel model = new FineOffice.Modules.ADM_LetterChannel(); model.Channel = txtChannel.Text.Trim(); letterChannelBll.Add(model); } catch (Exception ex) { Alert.Show(ex.Message); } PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("subwin_close")); }