예제 #1
0
        /****************************************
         ***生成器版本:V1.0.1.31494
         ***生成时间:2013-09-04 15:21:58
         ***公司:山西ICat Studio有限公司
         ***友情提示:以下代码为生成器自动生成,可做参照修改之用;
         ***         如需有其他业务要求,可在region外添加新方法;
         ***         如发现任何编译和运行时错误,请联系QQ:330669393。
         *****************************************/

        #region public members methods

        /// <summary>
        /// 根据条件筛选所有BookDomainType指定页码的数据(分页型)
        /// </summary>
        /// <param name="bookdomaintype">实体对象</param>
        /// <param name="pageparams">分页对象</param>
        /// <returns></returns>
        public string GetJsonByPage(EntityBookDomainType bookdomaintype, PageParams pageparams)
        {
            #region
            int totalCount = 0;
            BookDomainTypeClass bookdomaintypeclass = new BookDomainTypeClass();
            DataSet             bookdomaintypedata  = this.GetData(bookdomaintype, pageparams, out totalCount);
            return(base.GetJson(bookdomaintypedata, totalCount));

            #endregion
        }
예제 #2
0
        /// <summary>
        /// 将符合查询的数据导出Excel
        /// </summary>
        /// <param name="filename"></param>
        /// <param name="grid"></param>
        /// <param name="httplink"></param>
        public void OutputExcel(string filename, ExtjsGrid grid, EntityBookDomainType bookdomaintype)
        {
            #region
            int        totalcount  = 0;
            PageParams queryparams = new PageParams(1, 65536);
            DataSet    ds          = this.GetData(bookdomaintype, queryparams, out totalcount);

            ExportExcel exportexcel = new ExportExcel(filename, ds, grid);
            exportexcel.Output();
            #endregion
        }
예제 #3
0
 /// <summary>
 /// 添加BookDomainType表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="bookdomaintypedata">数据集对象</param>
 /// <param name="bookdomaintype">实体对象</param>
 public void AddRow(ref BookDomainTypeData bookdomaintypedata, EntityBookDomainType bookdomaintype)
 {
     #region
     DataRow dr = bookdomaintypedata.Tables[0].NewRow();
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainTypeId, bookdomaintype.domainTypeId);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainName, bookdomaintype.domainName);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.usable, bookdomaintype.usable);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.remark, bookdomaintype.remark);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.sort, bookdomaintype.sort);
     bookdomaintypedata.Tables[0].Rows.Add(dr);
     #endregion
 }
예제 #4
0
 /// <summary>
 /// 编辑bookdomaintypedata数据集中指定的行数据
 /// </summary>
 /// <param name="bookdomaintypedata">数据集对象</param>
 /// <param name="bookdomaintype">实体对象</param>
 public void EditRow(ref BookDomainTypeData bookdomaintypedata, EntityBookDomainType bookdomaintype)
 {
     #region
     if (bookdomaintypedata.Tables[0].Rows.Count <= 0)
     {
         bookdomaintypedata = this.getData(bookdomaintype.domainTypeId);
     }
     DataRow dr = bookdomaintypedata.Tables[0].Rows.Find(new object[1] {
         bookdomaintype.domainTypeId
     });
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainTypeId, bookdomaintype.domainTypeId);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainName, bookdomaintype.domainName);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.usable, bookdomaintype.usable);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.remark, bookdomaintype.remark);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.sort, bookdomaintype.sort);
     #endregion
 }
예제 #5
0
        /// <summary>
        /// 根据条件筛选所有BookDomainType指定页码的数据(分页型)
        /// </summary>
        /// <param name="bookdomaintype">实体对象</param>
        /// <param name="pageparams">分页对象</param>
        /// <param name="totalCount">符合条件的记录总数量</param>
        /// <returns></returns>
        public DataSet GetData(EntityBookDomainType bookdomaintype, PageParams pageparams, out int totalCount)
        {
            #region
            DBConditions querybusinessparams = new DBConditions(pageparams);
            querybusinessparams.Add(BookDomainTypeData.domainTypeId, EnumSqlType.sqlint,
                                    EnumCondition.Equal, bookdomaintype.domainTypeId);
            querybusinessparams.Add(BookDomainTypeData.domainName, EnumSqlType.nvarchar,
                                    EnumCondition.Equal, bookdomaintype.domainName);
            querybusinessparams.Add(BookDomainTypeData.usable, EnumSqlType.bit,
                                    EnumCondition.Equal, bookdomaintype.usable);
            querybusinessparams.Add(BookDomainTypeData.remark, EnumSqlType.nvarchar,
                                    EnumCondition.Equal, bookdomaintype.remark);
            querybusinessparams.Add(BookDomainTypeData.sort, EnumSqlType.sqlint,
                                    EnumCondition.Equal, bookdomaintype.sort);
            BookDomainTypeData bookvomaintypedata = new BookDomainTypeData();
            totalCount = this._bookdomaintypeclass.GetSingleT(bookvomaintypedata, querybusinessparams);
            return(bookvomaintypedata);

            #endregion
        }