Ejemplo n.º 1
0
 /// <summary>
 /// 查找是否存在所选周日志。
 /// </summary>
 /// <param name="wlogweeksummary"></param>
 /// <param name="json"></param>
 /// <returns></returns>
 public bool FindUserWeekSummary(EntityWLOGWeekSummary wlogweeksummary, ref string json)
 {
     #region
     int                 totalCount          = 0;
     PageParams          pageparams          = new PageParams();
     WLOGWeekSummaryData wlogweeksummarydata = new WLOGWeekSummaryData();
     DBConditions        querybusinessparams = new DBConditions(pageparams);
     querybusinessparams.Add(WLOGWeekSummaryData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, wlogweeksummary.writeUser);
     querybusinessparams.Add(WLOGWeekSummaryData.startDate, EnumSqlType.datetime, EnumCondition.Equal, wlogweeksummary.startDate);
     WLOGWeekSummaryData weeksummarydata = new WLOGWeekSummaryData();
     totalCount = this._wlogweeksummaryclass.GetSingleT(weeksummarydata, querybusinessparams);
     JsonHelper jsonhlp = new JsonHelper();
     if (weeksummarydata.Tables[0].Rows.Count > 0)
     {
         jsonhlp.AddObjectToJson("msg", "请注意:每人每周只限一篇总结!");
         jsonhlp.SetResult(false);
         json = jsonhlp.ToString();
         return(true);
     }
     else
     {
         return(false);
     }
     #endregion
 }
Ejemplo n.º 2
0
        /****************************************
         ***生成器版本:V1.0.1.31494
         ***生成时间:2013-04-24 18:43:49
         ***公司:山西ICat Studio有限公司
         ***友情提示:以下代码为生成器自动生成,可做参照修改之用;
         ***         如需有其他业务要求,可在region外添加新方法;
         ***         如发现任何编译和运行时错误,请联系QQ:330669393。
         *****************************************/

        #region public members methods

        /// <summary>
        /// 根据条件筛选所有WLOGWeekSummary指定页码的数据(分页型)
        /// </summary>
        /// <param name="wlogweeksummary">实体对象</param>
        /// <param name="pageparams">分页对象</param>
        /// <returns></returns>
        public string GetJsonByPage(EntityWLOGWeekSummary wlogweeksummary, PageParams pageparams)
        {
            #region
            int totalCount = 0;
            WLOGWeekSummaryClass wlogweeksummaryclass = new WLOGWeekSummaryClass();
            pageparams.PageSorts.Add(new PageSort(WLOGWeekSummaryData.writeTime, EnumSQLOrderBY.DESC));
            DataSet wlogweeksummarydata = this.GetData(wlogweeksummary, pageparams, out totalCount);
            return(base.GetJson(wlogweeksummarydata, totalCount));

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

            ExportExcel exportexcel = new ExportExcel(filename, ds, grid);
            exportexcel.Output();
            #endregion
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 添加WLOGWeekSummary表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="wlogweeksummarydata">数据集对象</param>
 /// <param name="wlogweeksummary">实体对象</param>
 public void AddRow(ref WLOGWeekSummaryData wlogweeksummarydata, EntityWLOGWeekSummary wlogweeksummary)
 {
     #region
     DataRow dr = wlogweeksummarydata.Tables[0].NewRow();
     wlogweeksummary.summaryId = this._wlogweeksummaryclass.GetMaxAddOne(wlogweeksummarydata).ToString();
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.summaryId, wlogweeksummary.summaryId);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeUser, wlogweeksummary.writeUser);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.startDate, wlogweeksummary.startDate);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.endDate, wlogweeksummary.endDate);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.weekBH, wlogweeksummary.weekBH);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submited, wlogweeksummary.submited);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submitTime, wlogweeksummary.submitTime);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeTime, wlogweeksummary.writeTime);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeIp, wlogweeksummary.writeIp);
     wlogweeksummarydata.Tables[0].Rows.Add(dr);
     #endregion
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 根据条件筛选所有WLOGWeekSummary指定页码的数据(分页型)
        /// </summary>
        /// <param name="wlogweeksummary">实体对象</param>
        /// <param name="pageparams">分页对象</param>
        /// <param name="totalCount">符合条件的记录总数量</param>
        /// <returns></returns>
        public DataSet GetData(EntityWLOGWeekSummary wlogweeksummary, PageParams pageparams, out int totalCount)
        {
            #region
            DBConditions querybusinessparams = new DBConditions(pageparams);
            querybusinessparams.Add(WLOGWeekSummaryData.writeUser, EnumSqlType.sqlint,
                                    EnumCondition.Equal, wlogweeksummary.writeUser);
            querybusinessparams.Add(WLOGWeekSummaryData.weekBH, EnumSqlType.nvarchar,
                                    EnumCondition.Equal, wlogweeksummary.weekBH);
            querybusinessparams.Add(WLOGWeekSummaryData.startDate, EnumSqlType.datetime,
                                    EnumCondition.GreaterOrEqual, wlogweeksummary.startDate);
            querybusinessparams.Add(WLOGWeekSummaryData.endDate, EnumSqlType.datetime,
                                    EnumCondition.LessOrEqual, wlogweeksummary.endDate);
            querybusinessparams.Add(WLOGWeekSummaryData.submited, EnumSqlType.bit,
                                    EnumCondition.Equal, wlogweeksummary.submited);
            WLOGWeekSummaryData wlogweeksummarydata = new WLOGWeekSummaryData();
            totalCount = this._wlogweeksummaryclass.SelectWLOGWeekSummaryByPage(wlogweeksummarydata, querybusinessparams);
            return(wlogweeksummarydata);

            #endregion
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 编辑wlogweeksummarydata数据集中指定的行数据
 /// </summary>
 /// <param name="wlogweeksummarydata">数据集对象</param>
 /// <param name="wlogweeksummary">实体对象</param>
 public void EditRow(ref WLOGWeekSummaryData wlogweeksummarydata, EntityWLOGWeekSummary wlogweeksummary)
 {
     #region
     if (wlogweeksummarydata.Tables[0].Rows.Count <= 0)
     {
         wlogweeksummarydata = this.getData(wlogweeksummary.summaryId);
     }
     DataRow dr = wlogweeksummarydata.Tables[0].Rows.Find(new object[1] {
         wlogweeksummary.summaryId
     });
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.summaryId, wlogweeksummary.summaryId);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeUser, wlogweeksummary.writeUser);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.startDate, wlogweeksummary.startDate);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.endDate, wlogweeksummary.endDate);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.weekBH, wlogweeksummary.weekBH);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submited, wlogweeksummary.submited);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submitTime, wlogweeksummary.submitTime);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeTime, wlogweeksummary.writeTime);
     wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeIp, wlogweeksummary.writeIp);
     #endregion
 }