Пример #1
0
        /// <summary>
        /// 删除海外工作的一条记录
        /// </summary>
        /// <param name="wAbroad">WAbrod类对象</param>
        public void Delete(WAbroad wAbroad)
        {
            DataOperation dataOperation = new DataOperation();
            string        sql           = "delete from TB_WAbroad where id  in ('" + wAbroad.Id + "')";

            dataOperation.DeleteRecord(sql);
        }
Пример #2
0
        public void Insert(WAbroad wAbroad)
        {
            DataOperation dataOperation = new DataOperation();
            string        sql           = "select * from TB_WAbroad where id  in ('" + wAbroad.Id + "')";
            DataTable     tb            = dataOperation.GetOneDataTable_sql(sql);

            if (tb.Rows.Count > 0)
            {
                dataOperation.Update1(wAbroad);
            }
            else
            {
                dataOperation.Insert1(wAbroad);
            }
        }