protected void btnSave_Click(object sender, EventArgs e) { string str = this.txtUserName.Text.Trim(); string str2 = this.txtRemark.Text.Trim(); if (string.IsNullOrWhiteSpace(str)) { MessageBox.ShowFailTip(this, MsEntryForm.ErrorNameNotNull); } else if (str2.Length > 300) { MessageBox.ShowFailTip(this, MsEntryForm.ErrorRemarkoverlength); } else { Maticsoft.Model.Ms.EntryForm model = new Maticsoft.Model.Ms.EntryForm { UserName = this.txtUserName.Text.Trim(), Age = new int?(int.Parse(this.dropAge.SelectedValue)), Email = this.txtEmail.Text.Trim(), TelPhone = this.txtTelPhone.Text.Trim(), Phone = this.txtPhone.Text.Trim(), QQ = this.txtQQ.Text.Trim(), MSN = this.txtMSN.Text.Trim(), HouseAddress = this.txtHouseAddress.Text.Trim(), CompanyAddress = this.txtCompanyAddress.Text.Trim(), RegionId = new int?(Convert.ToInt32(this.dropProvince.Area_iID)), Sex = this.dropSex.SelectedValue, Description = this.txtDescription.Text.Trim(), Remark = str2, State = new int?(int.Parse(this.dropState.SelectedValue)) }; Maticsoft.BLL.Ms.EntryForm form2 = new Maticsoft.BLL.Ms.EntryForm(); if (form2.Add(model) > 0) { this.btnCancle.Enabled = false; this.btnSave.Enabled = false; MessageBox.ShowSuccessTip(this, Site.TooltipSaveOK, "list.aspx"); } } }