Ejemplo n.º 1
0
    private void InitModule()
    {
        if (Request["ID"] == null)
        {
            return;
        }

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

        txtID.Text = id.ToString();
        FineOffice.Modules.OA_FormType model = typeBll.GetModel(d => d.ID == id);
        txtTypeNO.Text     = model.TypeNO;
        txtTypeName.Text   = model.FormTypeName;
        txtPinyinCode.Text = model.PinyinCode;
        txtRemark.Text     = model.Remark;
        chkStop.Checked    = model.Stop.Value;
    }
Ejemplo n.º 2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     FineOffice.Modules.OA_FormType model = new FineOffice.Modules.OA_FormType();
     model.TypeNO       = txtTypeNO.Text.Trim();
     model.FormTypeName = txtTypeName.Text.Trim();
     model.PinyinCode   = txtPinyinCode.Text.Trim();
     model.Remark       = txtRemark.Text.Trim();
     model.Stop         = chkStop.Checked;
     try
     {
         typeBll.Add(model);
         PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("subwin_close"));
     }
     catch (Exception ex)
     {
         Alert.ShowInParent(ex.Message);
     }
 }