예제 #1
0
        public string GetMissionsIdBySummaryId(EntityWLOGMission mission)
        {
            #region
            DBConditions querybusinessparams = new DBConditions();
            querybusinessparams.Add(WLOGMissionData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, mission.writeUser);
            querybusinessparams.Add(WLOGMissionData.summaryId, EnumSqlType.sqlint, EnumCondition.Equal, mission.summaryId);
            WLOGMissionData missiondata = new WLOGMissionData();
            this._wlogmissionclass.GetSingleT(missiondata, querybusinessparams);

            JsonHelper        jsonhlp    = new JsonHelper();
            string            missionsid = "";
            DataRowCollection drcollect  = missiondata.Tables[0].Rows;
            for (int i = 0; i < drcollect.Count; i++)
            {
                string temp = drcollect[i][WLOGMissionData.missionId].ToString();
                if (i != drcollect.Count - 1)
                {
                    temp += ',';
                }
                missionsid += temp;
            }
            jsonhlp.AddObjectToJson("missionId", missionsid);
            jsonhlp.SetResult(true);
            return(jsonhlp.ToString());

            #endregion
        }
예제 #2
0
 /// <summary>
 /// 添加WLOGMission表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="wlogmissiondata">数据集对象</param>
 /// <param name="wlogmission">实体对象</param>
 public void AddRow(ref WLOGMissionData wlogmissiondata, EntityWLOGMission wlogmission)
 {
     #region
     DataRow dr = wlogmissiondata.Tables[0].NewRow();
     wlogmission.missionId = this._wlogmissionclass.GetMaxAddOne(wlogmissiondata).ToString();
     wlogmissiondata.Assign(dr, WLOGMissionData.missionId, wlogmission.missionId);
     wlogmissiondata.Assign(dr, WLOGMissionData.summaryId, wlogmission.summaryId);
     wlogmissiondata.Assign(dr, WLOGMissionData.writeUser, wlogmission.writeUser);
     wlogmissiondata.Assign(dr, WLOGMissionData.projectId, wlogmission.projectId);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionBH, wlogmission.missionBH);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionName, wlogmission.missionName);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionRemark, wlogmission.missionRemark);
     wlogmissiondata.Assign(dr, WLOGMissionData.planned, wlogmission.planned);
     wlogmissiondata.Assign(dr, WLOGMissionData.plantimelimit, wlogmission.plantimelimit);
     wlogmissiondata.Assign(dr, WLOGMissionData.outputResult, wlogmission.outputResult);
     wlogmissiondata.Assign(dr, WLOGMissionData.startDate, wlogmission.startDate);
     wlogmissiondata.Assign(dr, WLOGMissionData.reviewState, wlogmission.reviewState);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionState, wlogmission.missionState);
     wlogmissiondata.Assign(dr, WLOGMissionData.deleted, wlogmission.deleted);
     wlogmissiondata.Assign(dr, WLOGMissionData.usable, wlogmission.usable);
     wlogmissiondata.Assign(dr, WLOGMissionData.updated, wlogmission.updated);
     wlogmissiondata.Assign(dr, WLOGMissionData.deleteTime, wlogmission.deleteTime);
     wlogmissiondata.Assign(dr, WLOGMissionData.writeTime, wlogmission.writeTime);
     wlogmissiondata.Assign(dr, WLOGMissionData.writeIp, wlogmission.writeIp);
     wlogmissiondata.Tables[0].Rows.Add(dr);
     #endregion
 }
예제 #3
0
 /// <summary>
 /// 编辑wlogmissiondata数据集中指定的行数据
 /// </summary>
 /// <param name="wlogmissiondata">数据集对象</param>
 /// <param name="wlogmission">实体对象</param>
 public void EditRow(ref WLOGMissionData wlogmissiondata, EntityWLOGMission wlogmission)
 {
     #region
     if (wlogmissiondata.Tables[0].Rows.Count <= 0)
     {
         wlogmissiondata = this.getData(wlogmission.missionId);
     }
     DataRow dr = wlogmissiondata.Tables[0].Rows.Find(new object[1] {
         wlogmission.missionId
     });
     wlogmissiondata.Assign(dr, WLOGMissionData.missionId, wlogmission.missionId);
     wlogmissiondata.Assign(dr, WLOGMissionData.summaryId, wlogmission.summaryId);
     wlogmissiondata.Assign(dr, WLOGMissionData.writeUser, wlogmission.writeUser);
     wlogmissiondata.Assign(dr, WLOGMissionData.projectId, wlogmission.projectId);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionBH, wlogmission.missionBH);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionName, wlogmission.missionName);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionRemark, wlogmission.missionRemark);
     wlogmissiondata.Assign(dr, WLOGMissionData.planned, wlogmission.planned);
     wlogmissiondata.Assign(dr, WLOGMissionData.plantimelimit, wlogmission.plantimelimit);
     wlogmissiondata.Assign(dr, WLOGMissionData.outputResult, wlogmission.outputResult);
     wlogmissiondata.Assign(dr, WLOGMissionData.startDate, wlogmission.startDate);
     wlogmissiondata.Assign(dr, WLOGMissionData.reviewState, wlogmission.reviewState);
     wlogmissiondata.Assign(dr, WLOGMissionData.missionState, wlogmission.missionState);
     wlogmissiondata.Assign(dr, WLOGMissionData.deleted, wlogmission.deleted);
     wlogmissiondata.Assign(dr, WLOGMissionData.usable, wlogmission.usable);
     wlogmissiondata.Assign(dr, WLOGMissionData.updated, wlogmission.updated);
     wlogmissiondata.Assign(dr, WLOGMissionData.deleteTime, wlogmission.deleteTime);
     wlogmissiondata.Assign(dr, WLOGMissionData.writeTime, wlogmission.writeTime);
     wlogmissiondata.Assign(dr, WLOGMissionData.writeIp, wlogmission.writeIp);
     #endregion
 }
예제 #4
0
        /****************************************
         ***生成器版本:V1.0.1.31494
         ***生成时间:2013-04-26 18:05:16
         ***公司:山西ICat Studio有限公司
         ***友情提示:以下代码为生成器自动生成,可做参照修改之用;
         ***         如需有其他业务要求,可在region外添加新方法;
         ***         如发现任何编译和运行时错误,请联系QQ:330669393。
         *****************************************/

        #region public members methods

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

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

            ExportExcel exportexcel = new ExportExcel(filename, ds, grid);
            exportexcel.Output();
            #endregion
        }
예제 #6
0
        public string GetMissionBySummaryId(EntityWLOGMission mission, SceneWeekSummary scene)
        {
            #region
            WLOGMissionClass wlogmissionclass    = new WLOGMissionClass();
            DBConditions     querybusinessparams = new DBConditions();
            querybusinessparams.Add(WLOGMissionData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, mission.writeUser);
            switch (scene)
            {
            case SceneWeekSummary.ViewMissions:
                querybusinessparams.Or(WLOGMissionData.summaryId,
                                       EnumSqlType.sqlint, EnumCondition.Equal, mission.summaryId);
                break;

            case SceneWeekSummary.AddWeekSummary:
                querybusinessparams.Or(WLOGMissionData.summaryId,
                                       EnumSqlType.sqlint, EnumCondition.EmptyIsNull, "");
                break;

            case SceneWeekSummary.EditWeekSummary:
                querybusinessparams.Or(WLOGMissionData.summaryId,
                                       EnumSqlType.sqlint, EnumCondition.EmptyIsNull, "");
                querybusinessparams.Add(WLOGMissionData.summaryId,
                                        EnumSqlType.sqlint, EnumCondition.Equal, mission.summaryId);
                querybusinessparams.Add(WLOGMissionData.writeUser,
                                        EnumSqlType.sqlint, EnumCondition.Equal, mission.writeUser);
                break;

            default:
                break;
            }
            int             totalCount  = 0;
            WLOGMissionData missiondata = new WLOGMissionData();
            totalCount = this._wlogmissionclass.GetSingleT(missiondata, querybusinessparams);
            return(base.GetJson(missiondata, totalCount));

            #endregion
        }
예제 #7
0
        /// <summary>
        /// 根据条件筛选所有WLOGMission指定页码的数据(分页型)
        /// </summary>
        /// <param name="wlogmission">实体对象</param>
        /// <param name="pageparams">分页对象</param>
        /// <param name="totalCount">符合条件的记录总数量</param>
        /// <returns></returns>
        public DataSet GetData(EntityWLOGMission wlogmission, PageParams pageparams, out int totalCount)
        {
            #region
            DBConditions querybusinessparams = new DBConditions(pageparams);
            querybusinessparams.Add(WLOGMissionData.writeUser, EnumSqlType.sqlint,
                                    EnumCondition.Equal, wlogmission.writeUser);
            querybusinessparams.Add(WLOGMissionData.missionBH, EnumSqlType.nvarchar,
                                    EnumCondition.LikeRight, wlogmission.missionBH);
            querybusinessparams.Add(WLOGMissionData.missionName, EnumSqlType.nvarchar,
                                    EnumCondition.LikeBoth, wlogmission.missionName);
            querybusinessparams.Add(WLOGMissionData.planned, EnumSqlType.bit,
                                    EnumCondition.Equal, wlogmission.planned);
            querybusinessparams.Add(WLOGMissionData.reviewState, EnumSqlType.bit,
                                    EnumCondition.Equal, wlogmission.reviewState);
            querybusinessparams.Add(WLOGMissionData.missionState, EnumSqlType.tinyint,
                                    EnumCondition.Equal, wlogmission.missionState);
            querybusinessparams.Add(WLOGMissionData.usable, EnumSqlType.bit,
                                    EnumCondition.Equal, wlogmission.usable);
            WLOGMissionData wlogmissiondata = new WLOGMissionData();
            totalCount = this._wlogmissionclass.SelectWLOGMissionByPage(wlogmissiondata, querybusinessparams);
            return(wlogmissiondata);

            #endregion
        }