Пример #1
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            InsureUserInfo insureUserInfo = new InsureUserInfo();

            insureUserInfo.Name             = this.txtbox_Name.Text;
            insureUserInfo.IDNO             = this.txtBox_IDNO.Text;
            insureUserInfo.SignatureImgName = "sig" + DateTime.Now.ToString("HHmmssffff");
            this.pictureBox1.Image.Save(LibCommon.AppContext.GetInstance().GetVal <AppSetting>(typeof(AppSetting)).TmpFileDir + insureUserInfo.SignatureImgName);
            insureUserInfo.Comment = this.textBox_Comment.Text;
            InsureUserInfoMgr.Instance.AddUser(insureUserInfo);
            MessageBox.Show("保存成功");
            Form form = base.Parent as Form;
            bool flag = form != null;

            if (flag)
            {
                form.Close();
            }
        }
Пример #2
0
 public bool AddUser(InsureUserInfo info)
 {
     this._users.Add(info);
     this.Save();
     return(true);
 }