private void InitModule() { int id = int.Parse(Request["ID"]); FineOffice.Modules.CRM_Source model = sourceBll.GetModel(t => t.ID == id); hiddenID.Text = model.ID.ToString(); txtSource.Text = model.Source; txtOrdering.Text = model.Ordering.ToString(); txtRemark.Text = model.Remark; }
protected void btnSave_Click(object sender, EventArgs e) { FineOffice.Modules.CRM_Source model = new FineOffice.Modules.CRM_Source(); model.Source = txtSource.Text.Trim(); model.Ordering = int.Parse(txtOrdering.Text); model.Remark = txtRemark.Text.Trim(); try { sourceBll.Add(model); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("subwin_close")); } catch (Exception ex) { Alert.ShowInParent(ex.Message); } }