private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.Text == "添加项目")
     {
         string strCol = "projectname,province,remarks";
         string strRow = "'" + txtProName.Text.Trim() + "'," + "'" + txtProvince.Text.Trim() + "'," + "'" + txtRemarks.Text.Trim() + "'";
         dataDisposes.Insertfull("projectinfo", strCol, strRow);
     }
     if (this.Text == "修改项目")
     {
         string strCol = "projectname" + "='" + txtProName.Text.Trim() + "'," + "province" + "='" + txtProvince.Text.Trim() + "'," + "remarks" + "='" + txtRemarks.Text.Trim() + "'";
         dataDisposes.Update("projectinfo", strCol, "where projectid=" + txtProID.Text);
     }
     State = true;
     this.Close();
     this.Dispose();
 }
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.Text == "添加用户")
     {
         string strCol = "username,province,remarks";
         string strRow = "'" + txtUserID.Text.Trim() + "'," + "'" + txtUserName.Text.Trim() + "'," + "'" + txtProvince.Text.Trim() + "'," + "'" + txtPhone.Text.Trim() + "'," + "'" + txtRemark.Text.Trim() + "'";
         //dataDisposes.Insertfull("userinfo", strCol, strRow);
         dataDisposes.Insert("userinfo", strRow);
     }
     if (this.Text == "修改用户")
     {
         string strCol = "username" + "='" + txtUserName.Text.Trim() + "'," + "province" + "='" + txtProvince.Text.Trim() + "'," + "phone" + "='" + txtPhone.Text.Trim() + "'," + "remarks" + "='" + txtPhone.Text.Trim() + "'";
         dataDisposes.Update("userinfo", strCol, "where userid=" + txtUserID.Text);
     }
     State = true;
     this.Close();
     this.Dispose();
 }
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.Text == "添加类型")
     {
         string strCol = "typename,category,remarks";
         string strRow = "'" + txtTypeName.Text.Trim() + "'," + "'" + txtCategory.Text.Trim() + "'," + "'" + txtRemarks.Text.Trim() + "'";
         dataDisposes.Insertfull("exceptionstype", strCol, strRow);
     }
     if (this.Text == "修改类型")
     {
         string strCol = "typename" + "='" + txtTypeName.Text.Trim() + "'," + "category" + "='" + txtCategory.Text.Trim() + "'," + "remarks" + "='" + txtRemarks.Text.Trim() + "'";
         dataDisposes.Update("exceptionstype", strCol, "where typeid=" + txtTypeID.Text);
     }
     TypeName = txtTypeName.Text;
     ID       = Convert.ToInt32(txtTypeID.Text);
     State    = true;
     this.Close();
     this.Dispose();
 }