예제 #1
0
        public bool peopleUpdate(out string msg)
        {
            msg = "";
            try
            {
                jktjBll jktjbll = new jktjBll();

                DataTable dt_xm_Update = new DataTable();
                dt_xm_Update.Rows.Add();
                //个人档案编号
                dt_xm_Update.Columns.Add("D_GRDABH");
                dt_xm_Update.Rows[0]["D_GRDABH"] = textBox_jkdah.Text;

                //姓名
                dt_xm_Update.Columns.Add("D_XM");
                dt_xm_Update.Rows[0]["D_XM"] = textBox_xm_sfz.Text;

                //身份证号
                dt_xm_Update.Columns.Add("D_ZJHQT");
                dt_xm_Update.Rows[0]["D_ZJHQT"] = textBox_sfzh.Text;

                //id
                dt_xm_Update.Columns.Add("id");
                dt_xm_Update.Rows[0]["id"] = id;

                //出生日期
                dt_xm_Update.Columns.Add("D_CSRQ");
                dt_xm_Update.Rows[0]["D_CSRQ"] = comboBox_sfz_rq.Text.ToString();

                //性别
                dt_xm_Update.Columns.Add("D_XB");
                dt_xm_Update.Rows[0]["D_XB"] = comboBox_sfz_xb.SelectedValue.ToString();

                //联系人电话
                dt_xm_Update.Columns.Add("D_LXrDH");
                dt_xm_Update.Rows[0]["D_LXrDH"] = textBox_new_lxrdh.Text;

                //联系电话
                dt_xm_Update.Columns.Add("D_LXDH");

                dt_xm_Update.AcceptChanges();

                dt_xm_Update.Rows[0]["D_LXDH"] = textBox_new_lxdh.Text;

                //人口学资料表表
                bool result = jktjbll.Upd(dt_xm_Update, "sql_T_DA_JKDA_RKXZL_update_xm");
                //体检人员信息表
                bool result_ = jktjbll.Upd(dt_xm_Update, "sql_update_TJRYXX1");
                return(result);
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                return(false);
            }
        }
예제 #2
0
        public bool peopleDelete(out string msg)
        {
            msg = "";
            try
            {
                jktjBll jktjbll = new jktjBll();

                DataTable dt_xm_Update = new DataTable();
                dt_xm_Update.Rows.Add();

                //id
                dt_xm_Update.Columns.Add("id");
                dt_xm_Update.Rows[0]["id"] = id;

                //联系电话
                dt_xm_Update.Columns.Add("deleteFlag");

                dt_xm_Update.AcceptChanges();

                dt_xm_Update.Rows[0]["deleteFlag"] = "1";

                bool result = jktjbll.Upd(dt_xm_Update, "sql_T_DA_JKDA_RKXZL_delete");
                return(result);
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                return(false);
            }
        }