//
        public static bool Save_member(xing xd, ic.memberC mem_obj)
        {
            if (xd == null)
            {
                return(false);
            }
            if (mem_obj == null)
            {
                return(false);
            }

            string[] tb_col = null;
            object[] _row   = null;
            object   _bdate = null;
            object   _jdate = null;

            //if (!string.IsNullOrEmpty(mem_obj.mem_birth_date))
            //{
            //    _bdate = Convert.ToDateTime(mem_obj.mem_birth_date);
            //}
            GetMemberID(xd);
            mem_obj.mem_id        = mem_id;
            mem_obj.mem_code      = mem_code;
            mem_obj.mem_u_code    = string.Format("{0}-{1}", mem_obj.mem_code, datam.LCH_ID);
            mem_obj.mem_status_id = em.xmem_status.Normal.ToByte();
            mem_obj.country_id    = -1;
            if (mem_obj.join_date != null)
            {
                _jdate = mem_obj.join_date.Value;
            }
            Int64 _stamp = xd.CreateFsTimeStamp();

            tb_col = new string[]
            {
                #region MyRegion
                "mem_id",
                "mem_code",
                "mem_u_code",
                "mem_title_id",
                "mem_name",
                "mem_o_name",
                "mem_gender_id",
                "mem_birth_yr",
                "mem_birth_date",
                "mem_birth_fs_id",
                "marital_type_id",
                "e_fs_id",
                "e_date",
                "baptismal_type_id",
                "mem_status_type_id",
                "mem_educ_level_id",
                "prev_church",
                "lch_type_id",
                "lch_id",
                "exp_type",
                "country_id",
                "tribe_id",
                "join_year",
                "join_date",
                "join_fs_id",
                "national_id",
                "national_id_type",
                "fs_time_stamp",
                "pc_us_id",
                "xfield1",
                "xfield2",
                "mem_type_id",
                "prev_religion",
                "empl_status_id",
                "mem_church_code"
                #endregion
            };

            _row = new object[]
            {
                #region MyRegion
                mem_obj.mem_id,
                mem_obj.mem_code,
                mem_obj.mem_u_code,
                mem_obj.mem_title_id,
                mem_obj.mem_name,
                mem_obj.mem_o_name,
                mem_obj.gender_id,
                mem_obj.birth_yr,
                _bdate,
                mem_obj.mem_birth_fs_id,
                mem_obj.marital_type_id,
                datam.CURR_FS.fs_id,
                datam.CURR_DATE,
                mem_obj.baptismal_type_id,
                mem_obj.mem_status_id,
                mem_obj.educ_level_id,
                mem_obj.prev_church,
                datam.LCH_TYPE_ID,
                datam.LCH_ID,
                emm.export_type.insert.ToByte(),
                mem_obj.country_id,
                0,//tribe name
                mem_obj.join_year,
                _jdate,
                mem_obj.join_fs_id,
                0, // national id
                0, //national_id_type
                _stamp,
                datam.PC_US_ID,
                0,
                0,
                mem_obj.mem_type.ToByte(),
                mem_obj.prev_religion,
                mem_obj.employment_status.ToByte(),
                mem_obj.mem_church_code
                #endregion
            };
            xd.SingleInsertCommand("member_tb", tb_col, _row);
            xd.IDCtrlDelete(mem_id_tb);
            return(true);
        }