Exemplo n.º 1
0
 public string GetSortingGroupId()
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         SortingGroupDao dao = new SortingGroupDao();
         return(dao.FindSortingGroupId());
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 分页查询数据,指定数据集表名TableName
 /// </summary>
 /// <param name="TableViewName">表名或视图名</param>
 /// <param name="PrimaryKey">表主键字段名称</param>
 /// <param name="QueryFields">查询字段字符串,字段名称逗号隔开</param>
 /// <param name="pageIndex">查询页码</param>
 /// <param name="pageSize">页码大小</param>
 /// <param name="orderBy">排序字段和方式</param>
 /// <param name="filter">查询条件</param>
 /// <param name="strTableName">返回数据集填充的表名</param>
 /// <returns>返回DataSet</returns>
 public DataSet GetExecuteQuery(int pageIndex, int pageSize, string filter, string OrderByFields)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         SortingGroupDao dao = new SortingGroupDao();
         return(dao.FindExecuteQuery(strTableName, strPrimaryKey, strQueryFields, pageIndex, pageSize, OrderByFields, filter, strTableName));
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 根据条件查询分拣厂家记录
 /// </summary>
 /// <param name="file"></param>
 /// <returns></returns>
 public int GetSortingGroup(string file)
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         SortingGroupDao dao = new SortingGroupDao();
         return(dao.FindSortingGroupCount(file, strTableName));
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="dataSet"></param>
        /// <returns></returns>
        public bool Delete(string dataSet)
        {
            bool flag = false;

            using (PersistentManager persistentManager = new PersistentManager())
            {
                SortingGroupDao dao = new SortingGroupDao();
                dao.delete(dataSet);
                flag = true;
            }
            return(flag);
        }
Exemplo n.º 5
0
        /// <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);
        }
Exemplo n.º 6
0
        /// <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);
        }