Beispiel #1
0
        public void update_resign()
        {
            databaseClass db = new databaseClass();

            string table = "tab_emp_resign";

            string[] Columns =
            {
                "re_ref_emp_id",
                "re_emp_code",
                "re_type",
                "re_detail",
                "re_resign_date",
                "re_submit_date",
                "re_admin_id",
                "event_status"
            };
            string[] Value =
            {
                re_ref_emp_id,
                re_emp_code,
                re_type,
                re_detail,
                Convert.ToDateTime(re_resign_date).ToString("yyyy-MM-dd",en),
                DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss",             en),
                re_admin_id,
                event_status
            };
            string where = "re_id = '" + re_id + "'";


            db.update(table, Columns, Value, where);
        }
Beispiel #2
0
        public void insertEmp()
        {
            CultureInfo en = new CultureInfo("EN");

            countEmpforCode();

            DateTime dt = new DateTime(3000, 01, 01);

            databaseClass db = new databaseClass();

            string table = "tab_emp";

            string[] Columns = { "ep_code", "ep_ref_personal_id", "ep_ref_type_id", "ep_start", "ep_end", "ep_status", "ep_submit_date", "ep_ref_admin_id", "event_status" };
            string[] Value   =
            {
                resultCode,
                ep_ref_personal_id,
                ep_ref_type_id,
                Convert.ToDateTime(ep_start).ToString("yyyy-MM-dd",en),
                Convert.ToDateTime(dt).ToString("yyyy-MM-dd",      en),
                "Y",
                DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss",       en),
                "1",
                "S"
            };

            ep_id = db.insert(table, Columns, Value);
        }
Beispiel #3
0
        public void insert_resign()
        {
            databaseClass db = new databaseClass();

            string table = "tab_emp_resign";

            string[] Columns =
            {
                "re_ref_emp_id",
                "re_emp_code",
                "re_type",
                "re_detail",
                "re_resign_date",
                "re_submit_date",
                "re_admin_id",
                "event_status"
            };
            string[] Value =
            {
                re_ref_emp_id,
                re_emp_code,
                re_type,
                re_detail,
                Convert.ToDateTime(re_resign_date).ToString("yyyy-MM-dd",en),
                DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss",             en),
                "1",
                "S"
            };


            db.insert(table, Columns, Value);
        }
Beispiel #4
0
        public void updateAddress()
        {
            databaseClass dbc   = new databaseClass();
            string        table = "tab_emp_address";

            string[] Columns =
            {
                "address_num",
                "address_moo",
                "address_type",
                "address_name",
                "address_alley",
                "address_road",
                "address_district_id",
                "address_amphur_id",
                "address_province_id",
                "address_postcode",
                "address_num_call",
                "address_moo_call",
                "address_type_call",
                "address_name_call",
                "address_alley_call",
                "address_road_call",
                "address_district_id_call",
                "address_amphur_id_call",
                "address_province_id_call",
                "address_postcode_call",
                "address_ref_admin_id",
                "address_submit_date"
            };
            string[] Value =
            {
                address_num,
                address_moo,
                address_type,
                address_name,
                address_alley,
                address_road,
                address_district_id,
                address_amphur_id,
                address_province_id,
                address_postcode,
                address_num_call,
                address_moo_call,
                address_type_call,
                address_name_call,
                address_alley_call,
                address_road_call,
                address_district_id_call,
                address_amphur_id_call,
                address_province_id_call,
                address_postcode_call,
                "1",
                DateTime.Now.ToString("yyyy-MM-dd")
            };
            string where = "address_ref_emp_id = '" + address_ref_emp_id + "'";
            dbc.update(table, Columns, Value, where);
        }
Beispiel #5
0
        public void update_position_change()
        {
            databaseClass db    = new databaseClass();
            string        table = "tab_emp_position_change";

            string[] Columns = { "pc_emp_id", "pc_comp_id", "pc_sect_id", "pc_dept_id", "pc_position_id", "pc_type", "pc_start_date", "pc_resign_date", "pc_admin_id", "pc_submit_date", "pc_status", "pc_active", "event_status", "pc_position_id_old", "pc_company_old", "pc_section_old", "pc_dept_old", "pc_type_old", "pc_start_old", "pc_end_old", "pc_ref_emp_position_id" };
            string[] Value   = { pc_emp_id, pc_comp_id, pc_sect_id, pc_dept_id, pc_position_id, pc_type, pc_start_date, pc_resign_date, pc_admin_id, pc_submit_date, pc_status, pc_active, event_status, pc_position_id_old, pc_company_old, pc_section_old, pc_dept_old, pc_type_old, pc_start_old, pc_end_old, pc_ref_emp_position_id };
            string where = "pc_id = '" + pc_id + "'";
            db.update(table, Columns, Value, where);
        }
Beispiel #6
0
        public void insert_file()
        {
            databaseClass dbc = new databaseClass();

            string table = "tab_person_file";

            string[] Columns = { "ch_file_name", "ch_file_ref_person_id", "ch_file_create_date", "ch_file_ref_admin_id", "event_status", "ch_ref_change_name_id" };
            string[] Value   = { ch_file_name, ch_file_ref_person_id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "1", "S", ch_ref_change_name_id };

            dbc.insert(table, Columns, Value);
        }
Beispiel #7
0
        public void insertWork()
        {
            databaseClass dbclass = new databaseClass();

            string table = "tab_personal_work";

            string[] Columns = { "work_company", "work_address", "work_start", "work_end", "work_position", "work_ref_personal_id", "work_submit_date", "work_ref_admin_id" };
            string[] Value   = { work_company, work_address, work_start, work_end, work_position, work_ref_personal_id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "1" };

            dbclass.insert(table, Columns, Value);
        }
Beispiel #8
0
        public void insert_img()
        {
            databaseClass dbc = new databaseClass();

            string table = "tab_emp_profile_img";

            string[] Columns = { "img_name", "img_ref_emp_id", "img_ref_person_id", "img_ref_admin_id", "img_submit_date" };
            string[] Value   = { img_name, img_ref_emp_id, img_ref_person_id, "1", Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss", en) };

            dbc.insert(table, Columns, Value);
        }
        public void update_resign_position()
        {
            databaseClass db = new databaseClass();

            string table = "tab_emp_position_resign";

            string[] Columns = { "prs_ref_emp_posit_id", "prs_ref_emp_id", "prs_position_id", "prs_comp_id", "prs_section_id", "prs_dept_id", "prs_type", "prs_start_date", "prs_resign_date", "prs_submit_date", "prs_admin_id", "event_status", "prs_resign_type", "prs_resign_detail" };
            string[] Value   = { prs_ref_emp_posit_id, prs_ref_emp_id, prs_position_id, prs_comp_id, prs_section_id, prs_dept_id, prs_type, Convert.ToDateTime(prs_start_date).ToString("yyyy-MM-dd", en), Convert.ToDateTime(prs_resign_date).ToString("yyyy-MM-dd", en), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", en), "1", event_status, prs_resign_type, prs_resign_detail };
            string where = "prs_id = '" + prs_id + "'";
            db.update(table, Columns, Value, where);
        }
Beispiel #10
0
        public void insertKid()
        {
            databaseClass dbclass = new databaseClass();

            string table = "tab_personal_kid";

            string[] Columns = { "kid_name", "kid_lastname", "kid_age", "kid_study_status", "kid_study_level", "kid_study_school", "kid_ref_personal_id", "kid_submit_date", "kid_ref_admin_id" };
            string[] Value   = { kid_name, kid_lastname, kid_age, kid_study_status, kid_study_level, kid_study_school, kid_ref_personal_id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "1" };

            dbclass.insert(table, Columns, Value);
        }
Beispiel #11
0
        public void insert_emp_action()
        {
            databaseClass data = new databaseClass();

            string table = "tab_emp_action";

            string[] Columns = { "emp_code", "emp_prefix_th", "emp_name_th", "emp_lastname_th", "emp_national_id", "emp_full_name", "emp_type_name", "emp_start_date", "emp_end_date", "emp_salary", "emp_stipend", "emp_action_start", "emp_action_end", "event_status" };
            string[] Value   = { emp_code, emp_prefix_th, emp_name_th, emp_lastname_th, emp_national_id, emp_full_name, emp_type_name, DateTime.Now.ToString("yyyy-MM-dd", en), Convert.ToDateTime(emp_end_date).ToString("yyyy-MM-dd", en), emp_salary, emp_stipend, Convert.ToDateTime(emp_action_start).ToString("yyyy-MM-dd", en), Convert.ToDateTime(emp_action_end).ToString("yyyy-MM-dd", en), "S" };

            data.insert(table, Columns, Value);
        }
Beispiel #12
0
        public void updateKid()
        {
            databaseClass dbc   = new databaseClass();
            string        table = "tab_personal_kid";

            string[] Columns = { "kid_name", "kid_lastname", "kid_age", "kid_study_status", "kid_study_level", "kid_study_school", "kid_ref_personal_id", "kid_submit_date", "kid_ref_admin_id" };
            string[] Value   = { kid_name, kid_lastname, kid_age, kid_study_status, kid_study_level, kid_study_school, kid_ref_personal_id, Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"), "1" };
            string where = "kid_id = '" + kid_id + "'";

            dbc.update(table, Columns, Value, where);
        }
        public void insert_resign_LOG()
        {
            databaseClass db = new databaseClass();

            string table = "tab_emp_position_resign";

            string[] Columns = { "prs_id", "prs_ref_emp_posit_id", "prs_ref_emp_id", "prs_position_id", "prs_comp_id", "prs_section_id", "prs_dept_id", "prs_type", "prs_start_date", "prs_resign_date", "prs_submit_date", "prs_admin_id", "event_status", "prs_resign_type", "prs_resign_detail" };
            string[] Value   = { prs_id, prs_ref_emp_posit_id, prs_ref_emp_id, prs_position_id, prs_comp_id, prs_section_id, prs_dept_id, prs_type, Convert.ToDateTime(prs_start_date).ToString("yyyy-MM-dd", en), Convert.ToDateTime(prs_resign_date).ToString("yyyy-MM-dd", en), Convert.ToDateTime(prs_submit_date).ToString("yyyy-MM-dd HH:mm:ss", en), prs_admin_id, event_status, prs_resign_type, prs_resign_detail };

            db.insert(table, Columns, Value);
        }
Beispiel #14
0
        public void updateStudy()
        {
            databaseClass dbc   = new databaseClass();
            string        table = "tab_personal_study";

            string[] Columns = { "study_year", "study_academy", "study_gpa", "study_degree", "study_branch", "study_ref_personal_id", "study_submit_date", "study_ref_admin_id" };
            string[] Value   = { study_year, study_academy, study_gpa, study_degree, study_branch, study_ref_personal_id, Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"), "1" };
            string where = "study_id = '" + study_id + "'";

            dbc.update(table, Columns, Value, where);
        }
Beispiel #15
0
        public void insertPersonal()
        {
            databaseClass db = new databaseClass();

            string table = "tab_personal";

            string[] Columns = { "ps_prefix_th", "ps_prefix_en", "ps_name_th", "ps_lastname_th", "ps_name_en", "ps_lastname_en", "ps_gender", "ps_blood", "ps_national_id", "ps_national_date_start", "ps_national_date_end", "ps_birthday", "ps_nationality", "ps_race", "ps_status_marital", "ps_admin_id", "ps_create_date", "ps_religion" };
            string[] Value   = { prefix_th, prefix_en, name_th, lastname_th, name_en, lastname_en, gender, blood, national_id, national_start, national_end, Convert.ToDateTime(birthday).ToString("yyyy-MM-dd", en), nationality, race, marital, "1", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), religion };

            personal_id = db.insert(table, Columns, Value);
        }
Beispiel #16
0
        public void insertTrain()
        {
            databaseClass dbclass = new databaseClass();

            string table = "tab_personal_train";

            string[] Columns = { "train_title", "train_location", "train_start", "train_end", "train_ref_personal_id", "train_submit_date", "train_ref_admin_id" };
            string[] Value   = { train_title, train_location, train_start, train_end, train_ref_personal_id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "1" };

            dbclass.insert(table, Columns, Value);
        }
Beispiel #17
0
        public void updatePersonal()
        {
            databaseClass db = new databaseClass();

            string table = "tab_personal";

            string[] Columns = { "ps_gender", "ps_blood", "ps_national_id", "ps_national_date_start", "ps_national_date_end", "ps_birthday", "ps_nationality", "ps_race", "ps_religion", "ps_status_marital", "event_status" };
            string[] Value   = { gender, blood, national_id, national_start, national_end, Convert.ToDateTime(birthday).ToString("yyyy-MM-dd", en), nationality, race, religion, marital, event_status };
            string where = "ps_id = '" + personal_id + "'";

            db.update(table, Columns, Value, where);
        }
Beispiel #18
0
        public void insertStudy()
        {
            databaseClass dbclass = new databaseClass();

            string table = "tab_personal_study";

            string[] Columns = { "study_year", "study_academy", "study_gpa", "study_degree", "study_branch", "study_ref_personal_id", "study_submit_date", "study_ref_admin_id" };
            string[] Value   = { study_year, study_academy, study_gpa, study_degree, study_branch, study_ref_personal_id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "1" };


            dbclass.insert(table, Columns, Value);
        }
Beispiel #19
0
        public void updateTrain()
        {
            databaseClass dbc = new databaseClass();

            string table = "tab_personal_train";

            string[] Columns = { "train_title", "train_location", "train_start", "train_end", "train_ref_personal_id", "train_submit_date", "train_ref_admin_id" };
            string[] Value   = { train_title, train_location, train_start, train_end, train_ref_personal_id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "1" };
            string where = "train_id = '" + train_id + "'";

            dbc.update(table, Columns, Value, where);
        }
Beispiel #20
0
        public void updateWork()
        {
            databaseClass dbc = new databaseClass();

            string table = "tab_personal_work";

            string[] Columns = { "work_company", "work_address", "work_start", "work_end", "work_position", "work_ref_personal_id", "work_submit_date", "work_ref_admin_id" };
            string[] Value   = { work_company, work_address, work_start, work_end, work_position, work_ref_personal_id, Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"), "1" };
            string where = "work_id = '" + work_id + "'";

            dbc.update(table, Columns, Value, where);
        }
Beispiel #21
0
        public void update_Status()
        {
            databaseClass dbc = new databaseClass();

            string table = "tab_info_status";

            string[] Columns = { "status_name", "status_submit_date", "status_admin_id", "event_status" };
            string[] Value   = { status_name, Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss", en), "1", event_status };
            string where = "status_id = '" + status_id + "'";

            dbc.update(table, Columns, Value, where);
        }
Beispiel #22
0
        public void update_stipend()
        {
            databaseClass db = new databaseClass();

            string table = "tab_emp_action";

            string[] Columns = { "emp_stipend" };
            string[] Value   = { emp_stipend };
            string where = "emp_code = '" + emp_code + "'";

            db.update(table, Columns, Value, where);
        }
Beispiel #23
0
        public void insert_position_chane()
        {
            databaseClass db = new databaseClass();


            string table = "tab_emp_position_change";

            string[] Columns = { "pc_emp_id", "pc_comp_id", "pc_sect_id", "pc_dept_id", "pc_position_id", "pc_type", "pc_start_date", "pc_resign_date", "pc_admin_id", "pc_submit_date", "pc_status", "pc_active", "event_status", "pc_position_id_old", "pc_company_old", "pc_section_old", "pc_dept_old", "pc_type_old", "pc_start_old", "pc_end_old", "pc_ref_emp_position_id" };
            string[] Value   = { pc_emp_id, pc_comp_id, pc_sect_id, pc_dept_id, pc_position_id, pc_type, Convert.ToDateTime(pc_start_date).ToString("yyyy-MM-dd", en), Convert.ToDateTime(dt).ToString("yyyy-MM-dd", en), pc_admin_id, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", en), pc_status, pc_active, event_status, pc_position_id_old, pc_company_old, pc_section_old, pc_dept_old, pc_type_old, Convert.ToDateTime(pc_start_old).ToString("yyyy-MM-dd", en), Convert.ToDateTime(pc_end_old).ToString("yyyy-MM-dd", en), pc_ref_emp_position_id };

            db.insert(table, Columns, Value);
        }
Beispiel #24
0
        public void update_emp()
        {
            CultureInfo   en = new CultureInfo("EN");
            databaseClass db = new databaseClass();

            string table = "tab_emp";

            string[] Columns = { "ep_code", "ep_ref_personal_id", "ep_ref_type_id", "ep_start", "ep_end", "ep_status", "ep_submit_date", "ep_ref_admin_id", "event_status" };
            string[] Value   =
            {
                ep_code,
                ep_ref_personal_id,
                ep_ref_type_id,
                Convert.ToDateTime(ep_start).ToString("yyyy-MM-dd",               en),
                Convert.ToDateTime(ep_end).ToString("yyyy-MM-dd",                 en),
                ep_status,
                Convert.ToDateTime(ep_submit_date).ToString("yyyy-MM-dd HH:mm:ss",en),
                ep_ref_admin_id,
                event_status
            };
            string where = "ep_id = '" + ep_id + "'";

            db.update(table, Columns, Value, where);
        }
Beispiel #25
0
        public void insertFamily()
        {
            databaseClass dbClass = new databaseClass();


            if (fam_age_dad == null || fam_age_dad == "")
            {
                fam_age_dad = "0";
            }

            if (fam_age_mom == null || fam_age_mom == "")
            {
                fam_age_mom = "0";
            }

            if (fam_age_marry == null || fam_age_marry == "")
            {
                fam_age_marry = "0";
            }

            using (SqlConnection conn = new SqlConnection(db.sqlConnection)) {
                conn.Open();
                SqlCommand cmd = new SqlCommand("INSERT INTO tab_personal_family (" +
                                                "fam_name_dad" +
                                                ",fam_lastname_dad" +
                                                ",fam_age_dad" +
                                                ",fam_num_dad" +
                                                ",fam_moo_dad" +
                                                ",fam_province_dad" +
                                                ",fam_amphur_dad" +
                                                ",fam_district_dad" +
                                                ",fam_postcode_dad" +
                                                ",fam_tel_dad" +
                                                ",fam_mobile_dad" +
                                                ",fam_name_mom" +
                                                ",fam_lastname_mom" +
                                                ",fam_age_mom" +
                                                ",fam_num_mom" +
                                                ",fam_moo_mom" +
                                                ",fam_province_mom" +
                                                ",fam_amphur_mom" +
                                                ",fam_district_mom" +
                                                ",fam_postcode_mom" +
                                                ",fam_tel_mom" +
                                                ",fam_mobile_mom" +
                                                ",fam_name_marry" +
                                                ",fam_lastname_marry" +
                                                ",fam_age_marry" +
                                                ",fam_num_marry" +
                                                ",fam_moo_marry" +
                                                ",fam_province_marry" +
                                                ",fam_amphur_marry" +
                                                ",fam_district_marry" +
                                                ",fam_postcode_marry" +
                                                ",fam_tel_marry" +
                                                ",fam_mobile_marry" +
                                                ",fam_ref_person_id" +
                                                ",fam_submit_date" +
                                                ",fam_ref_admin_id" + ") VALUES(" +
                                                "@fam_name_dad" +
                                                ",@fam_lastname_dad" +
                                                ",@fam_age_dad" +
                                                ",@fam_num_dad" +
                                                ",@fam_moo_dad" +
                                                ",@fam_province_dad" +
                                                ",@fam_amphur_dad" +
                                                ",@fam_district_dad" +
                                                ",@fam_postcode_dad" +
                                                ",@fam_tel_dad" +
                                                ",@fam_mobile_dad" +
                                                ",@fam_name_mom" +
                                                ",@fam_lastname_mom" +
                                                ",@fam_age_mom" +
                                                ",@fam_num_mom" +
                                                ",@fam_moo_mom" +
                                                ",@fam_province_mom" +
                                                ",@fam_amphur_mom" +
                                                ",@fam_district_mom" +
                                                ",@fam_postcode_mom" +
                                                ",@fam_tel_mom" +
                                                ",@fam_mobile_mom" +
                                                ",@fam_name_marry" +
                                                ",@fam_lastname_marry" +
                                                ",@fam_age_marry" +
                                                ",@fam_num_marry" +
                                                ",@fam_moo_marry" +
                                                ",@fam_province_marry" +
                                                ",@fam_amphur_marry" +
                                                ",@fam_district_marry" +
                                                ",@fam_postcode_marry" +
                                                ",@fam_tel_marry" +
                                                ",@fam_mobile_marry" +
                                                ",@fam_ref_person_id" +
                                                ",@fam_submit_date" +
                                                ",@fam_ref_admin_id" + ")", conn);
                cmd.Parameters.AddWithValue("@fam_name_dad", fam_name_dad);
                cmd.Parameters.AddWithValue("@fam_lastname_dad", fam_lastname_dad);
                cmd.Parameters.AddWithValue("@fam_age_dad", fam_age_dad);
                cmd.Parameters.AddWithValue("@fam_num_dad", fam_num_dad);
                cmd.Parameters.AddWithValue("@fam_moo_dad", fam_moo_dad);
                cmd.Parameters.AddWithValue("@fam_province_dad", fam_province_dad);
                cmd.Parameters.AddWithValue("@fam_amphur_dad", fam_amphur_dad);
                cmd.Parameters.AddWithValue("@fam_district_dad", fam_district_dad);
                cmd.Parameters.AddWithValue("@fam_postcode_dad", fam_postcode_dad);
                cmd.Parameters.AddWithValue("@fam_tel_dad", fam_tel_dad);
                cmd.Parameters.AddWithValue("@fam_mobile_dad", fam_mobile_dad);
                cmd.Parameters.AddWithValue("@fam_name_mom", fam_name_mom);
                cmd.Parameters.AddWithValue("@fam_lastname_mom", fam_lastname_mom);
                cmd.Parameters.AddWithValue("@fam_age_mom", fam_age_mom);
                cmd.Parameters.AddWithValue("@fam_num_mom", fam_num_mom);
                cmd.Parameters.AddWithValue("@fam_moo_mom", fam_moo_mom);
                cmd.Parameters.AddWithValue("@fam_province_mom", fam_province_mom);
                cmd.Parameters.AddWithValue("@fam_amphur_mom", fam_amphur_mom);
                cmd.Parameters.AddWithValue("@fam_district_mom", fam_district_mom);
                cmd.Parameters.AddWithValue("@fam_postcode_mom", fam_postcode_mom);
                cmd.Parameters.AddWithValue("@fam_tel_mom", fam_tel_mom);
                cmd.Parameters.AddWithValue("@fam_mobile_mom", fam_mobile_mom);
                cmd.Parameters.AddWithValue("@fam_name_marry", fam_name_marry);
                cmd.Parameters.AddWithValue("@fam_lastname_marry", fam_lastname_marry);
                cmd.Parameters.AddWithValue("@fam_age_marry", fam_age_marry);
                cmd.Parameters.AddWithValue("@fam_num_marry", fam_num_marry);
                cmd.Parameters.AddWithValue("@fam_moo_marry", fam_moo_marry);
                cmd.Parameters.AddWithValue("@fam_province_marry", fam_province_marry);
                cmd.Parameters.AddWithValue("@fam_amphur_marry", fam_amphur_marry);
                cmd.Parameters.AddWithValue("@fam_district_marry", fam_district_marry);
                cmd.Parameters.AddWithValue("@fam_postcode_marry", fam_postcode_marry);
                cmd.Parameters.AddWithValue("@fam_tel_marry", fam_tel_marry);
                cmd.Parameters.AddWithValue("@fam_mobile_marry", fam_mobile_marry);
                cmd.Parameters.AddWithValue("@fam_ref_person_id", person_id);
                cmd.Parameters.AddWithValue("@fam_submit_date", DateTime.Now);
                cmd.Parameters.AddWithValue("@fam_ref_admin_id", "1");
                cmd.ExecuteNonQuery();
                cmd.Dispose();

                conn.Close();
            }
        }
Beispiel #26
0
        public void updateFamily()
        {
            databaseClass dbc = new databaseClass();

            string table = "tab_personal_family";

            string[] Columns =
            {
                "fam_name_dad",
                "fam_lastname_dad",
                "fam_age_dad",
                "fam_num_dad",
                "fam_moo_dad",
                "fam_province_dad",
                "fam_amphur_dad",
                "fam_district_dad",
                "fam_postcode_dad",
                "fam_tel_dad",
                "fam_mobile_dad",
                "fam_name_mom",
                "fam_lastname_mom",
                "fam_age_mom",
                "fam_num_mom",
                "fam_moo_mom",
                "fam_province_mom",
                "fam_amphur_mom",
                "fam_district_mom",
                "fam_postcode_mom",
                "fam_tel_mom",
                "fam_mobile_mom",
                "fam_name_marry",
                "fam_lastname_marry",
                "fam_age_marry",
                "fam_num_marry",
                "fam_moo_marry",
                "fam_province_marry",
                "fam_amphur_marry",
                "fam_district_marry",
                "fam_postcode_marry",
                "fam_tel_marry",
                "fam_mobile_marry",
                "fam_ref_person_id",
                "fam_submit_date",
                "fam_ref_admin_id"
            };

            string[] Value =
            {
                fam_name_dad,
                fam_lastname_dad,
                fam_age_dad,
                fam_num_dad,
                fam_moo_dad,
                fam_province_dad,
                fam_amphur_dad,
                fam_district_dad,
                fam_postcode_dad,
                fam_tel_dad,
                fam_mobile_dad,
                fam_name_mom,
                fam_lastname_mom,
                fam_age_mom,
                fam_num_mom,
                fam_moo_mom,
                fam_province_mom,
                fam_amphur_mom,
                fam_district_mom,
                fam_postcode_mom,
                fam_tel_mom,
                fam_mobile_mom,
                fam_name_marry,
                fam_lastname_marry,
                fam_age_marry,
                fam_num_marry,
                fam_moo_marry,
                fam_province_marry,
                fam_amphur_marry,
                fam_district_marry,
                fam_postcode_marry,
                fam_tel_marry,
                fam_mobile_marry,
                person_id,
                Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"),
                fam_ref_admin_id
            };

            string where = "fam_id = '" + fam_id + "'";

            dbc.update(table, Columns, Value, where);
        }