/// <summary> /// 添加 /// </summary> /// <returns></returns> public bool Insert() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { SortingGroupDao dao = new SortingGroupDao(); string date = DateTime.Now.Date.ToString("yyyyMMdd"); string sql = string.Format("insert into DWV_DPS_SORTING(SORTING_CODE,SORTING_NAME,SORTING_TYPE,ISACTIVE,UPDATE_DATE) " + " values('{0}','{1}','{2}','{3}',{4}) ", this.SORTING_CODE1, this.SORTING_NAME1, this.SORTING_TYPE1, this.ISACTIVE1, date); dao.SetData(sql); flag = true; } return(flag); }
/// <summary> /// 修改 /// </summary> /// <returns></returns> public bool Update() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { SortingGroupDao dao = new SortingGroupDao(); string date = DateTime.Now.Date.ToString("yyyyMMdd"); string sql = string.Format("update DWV_DPS_SORTING set SORTING_NAME='{1}',SORTING_TYPE='{2}',ISACTIVE='{3}',UPDATE_DATE='{4}' where SORTING_CODE='{0}'" , this.SORTING_CODE1, this.SORTING_NAME1, this.SORTING_TYPE1, this.ISACTIVE1, date ); dao.SetData(sql); flag = true; } return(flag); }