/// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tOaSwInfo_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tOaSwInfo_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TOaSwInfoVo tOaSwInfo_UpdateSet, TOaSwInfoVo tOaSwInfo_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tOaSwInfo_UpdateSet, TOaSwInfoVo.T_OA_SW_INFO_TABLE);

            strSQL += this.BuildWhereStatement(tOaSwInfo_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tOaSwInfo">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TOaSwInfoVo tOaSwInfo)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tOaSwInfo, TOaSwInfoVo.T_OA_SW_INFO_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tOaSwInfo.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TOaSwInfoVo tOaSwInfo)
        {
            string strSQL = "delete from T_OA_SW_INFO ";

            strSQL += this.BuildWhereStatement(tOaSwInfo);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tOaSwInfo">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount_ForRead(TOaSwInfoVo tOaSwInfo, string strUserID)
        {
            string strSQL = " select Count(*) from T_OA_SW_INFO sw ";

            strSQL += " join T_OA_SW_READ sr on sr.SW_ID=sw.id and sr.SW_PLAN_ID='" + strUserID + "' {0}";

            strSQL = String.Format(strSQL, BuildWhereStatement_ForRead(tOaSwInfo));
            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tOaSwInfo">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TOaSwInfoVo tOaSwInfo, int iIndex, int iCount)
        {
            string strSQL = " select * from T_OA_SW_INFO {0} ";

            strSQL += " order by ID desc";
            strSQL  = String.Format(strSQL, BuildWhereStatement(tOaSwInfo));

            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 获取对象DataTable,指定用户的传阅收文
        /// </summary>
        /// <param name="tOaSwInfo">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable_ForRead(TOaSwInfoVo tOaSwInfo, string strUserID, int iIndex, int iCount)
        {
            string strSQL = " select sw.*,sr.SW_PLAN_DATE as READ_DATE,sr.IS_OK from T_OA_SW_INFO sw ";

            strSQL += " join T_OA_SW_READ sr on sr.SW_ID=sw.id and sr.SW_PLAN_ID='" + strUserID + "' {0}";
            strSQL += " and sr.REMARK1='0'";
            strSQL  = String.Format(strSQL, BuildWhereStatement_ForRead(tOaSwInfo));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(tOaSwInfo, strSQL, iIndex, iCount)));
        }
Beispiel #7
0
    protected void btn_Save_Click(object sender, EventArgs e)
    {
        TOaSwInfoVo objSW = new TOaSwInfoVo();

        objSW.FROM_CODE    = this.FROM_CODE.Text;
        objSW.SW_CODE      = this.SW_CODE.Text;
        objSW.SW_FROM      = this.SW_FROM.Text;
        objSW.SW_COUNT     = this.SW_COUNT.Text;
        objSW.SW_DATE      = DateTime.Now.ToString("yyyy-MM-dd HH:00:00");
        objSW.SW_TITLE     = this.SW_TITLE.Text;
        objSW.SW_MJ        = this.MJ.SelectedValue;
        objSW.SW_SIGN_ID   = this.SW_SIGN_ID.Text;
        objSW.SW_SIGN_DATE = this.SW_SIGN_DATE.Text;
        objSW.SW_STATUS    = "1";
        objSW.SW_REG_DATE  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        objSW.SW_REG_ID    = LogInfo.UserInfo.ID;

        //    objSW.SW_PLAN_INFO = this.SW_PLAN_INFO.Value;
        objSW.SW_PLAN_ID   = LogInfo.UserInfo.ID;
        objSW.SW_PLAN_DATE = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

        //  objSW.SW_PLAN_APP_INFO = this.SW_PLAN_APP_INFO.Value;
        objSW.SW_PLAN_APP_ID   = LogInfo.UserInfo.ID;
        objSW.SW_PLAN_APP_DATE = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

        // objSW.SW_APP_INFO = this.SW_APP_INFO.Value;
        objSW.SW_APP_ID   = LogInfo.UserInfo.ID;
        objSW.SW_APP_DATE = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

        if (this.hidTaskId.Value.Length == 0)
        {
            objSW.ID = GetSerialNumber("t_oa_SWInfoID");

            if (new TOaSwInfoLogic().Create(objSW))
            {
                LigerDialogAlert("保存成功!", DialogMold.success.ToString());
            }
            else
            {
                LigerDialogAlert("保存成功!", DialogMold.error.ToString());
                return;
            }
        }
        else
        {
            objSW.ID = this.hidTaskId.Value;
            if (new TOaSwInfoLogic().Edit(objSW))
            {
                LigerDialogAlert("保存成功!", DialogMold.success.ToString());
            }
            else
            {
                LigerDialogAlert("保存成功!", DialogMold.error.ToString());
                return;
            }
        }
    }
Beispiel #8
0
    void IWFStepRules.CreatAndRegisterBusinessData()
    {
        //这里是产生和注册业务数据的地方
        TOaSwInfoVo objSW = new TOaSwInfoVo();

        objSW.FROM_CODE    = this.FROM_CODE.Text;
        objSW.SW_CODE      = this.SW_CODE.Text;
        objSW.SW_FROM      = this.SW_FROM.Text;
        objSW.SW_COUNT     = this.SW_COUNT.Text;
        objSW.SW_DATE      = DateTime.Now.ToString("yyyy-MM-dd HH:00:00");
        objSW.SW_TITLE     = this.SW_TITLE.Text;
        objSW.SW_MJ        = this.MJ.SelectedValue;
        objSW.SW_SIGN_ID   = this.SW_SIGN_ID.Text;
        objSW.SW_SIGN_DATE = this.SW_SIGN_DATE.Text;
        objSW.SW_STATUS    = "1";
        objSW.SW_REG_DATE  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        objSW.SW_REG_ID    = LogInfo.UserInfo.ID;

        if (this.hidTaskId.Value.Length == 0)
        {
            objSW.ID = GetSerialNumber("t_oa_SWInfoID");

            if (new TOaSwInfoLogic().Create(objSW))
            {
                wfControl.SaveInstStepServiceData("收文ID", "sw_id", objSW.ID, "1");

                //注册编号
                wfControl.ServiceCode = "SW" + DateTime.Now.ToString("yyyyMMddHHmmss");
                //注册名称
                wfControl.ServiceName = "“" + this.SW_TITLE.Text + "”" + "公文收取";
            }
            else
            {
                LigerDialogAlert("数据发送失败!", "error");
                return;
            }
        }
        else
        {
            objSW.ID = this.hidTaskId.Value;
            if (new TOaSwInfoLogic().Edit(objSW))
            {
                wfControl.SaveInstStepServiceData("收文ID", "sw_id", objSW.ID, "1");

                //注册编号
                wfControl.ServiceCode = "SW" + DateTime.Now.ToString("yyyyMMddHHmmss");
                //注册名称
                wfControl.ServiceName = "“" + this.SW_TITLE.Text + "”" + "公文收取";
            }
            else
            {
                LigerDialogAlert("数据发送失败!", "error");
                return;
            }
        }
    }
    public static string deleteOneGridInfo(string strValue)
    {
        TOaSwInfoVo TOaSwInfoVo = new TOaSwInfoVo();

        TOaSwInfoVo.ID = strValue;
        bool isSuccess = new TOaSwInfoLogic().Edit(TOaSwInfoVo);

        if (isSuccess)
        {
            new PageBase().WriteLog("删除收文信息", "", new PageBase().LogInfo.UserInfo.USER_NAME + "删除收文信息" + TOaSwInfoVo.ID + "成功");
        }
        return(isSuccess == true ? "1" : "0");
    }
    /// <summary>
    /// 获取断面信息
    /// </summary>
    /// <returns></returns>
    private string getSWList(string strSWStatus)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        TOaSwInfoVo objSWInfo = new TOaSwInfoVo();

        objSWInfo.SW_STATUS = strSWStatus;
        //objSWInfo.DRAFT_ID = LogInfo.UserInfo.ID;
        int       intTotalCount = new TOaSwInfoLogic().GetSelectResultCount(objSWInfo);
        DataTable dt            = new TOaSwInfoLogic().SelectByTable(objSWInfo, intPageIndex, intPageSize);
        string    strJson       = LigerGridDataToJson(dt, intTotalCount);

        return(strJson);
    }
    /// <summary>
    /// 获取断面信息
    /// </summary>
    /// <returns></returns>
    private string getOneGridInfo(string strSwStatus)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        TOaSwInfoVo TOaSwInfoVo = new TOaSwInfoVo();

        TOaSwInfoVo.SW_STATUS = strSwStatus;

        DataTable dt            = new TOaSwInfoLogic().SelectByTable(TOaSwInfoVo, intPageIndex, intPageSize);
        int       intTotalCount = new TOaSwInfoLogic().GetSelectResultCount(TOaSwInfoVo);

        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Beispiel #12
0
    public static string SaveData(string LoginID, string strID, string strFromCode, string strSwCode, string strSwFrom, string strSwCount, string strSwMJ, string strSwTitle, string strSubWord, string strSwSignID, string strSwSignDate)
    {
        string      strResult = "";
        TOaSwInfoVo objSW     = new TOaSwInfoVo();

        objSW.FROM_CODE    = strFromCode;                                  //原文编号
        objSW.SW_CODE      = strSwCode;                                    //收文编号
        objSW.SW_FROM      = strSwFrom;                                    //来文单位
        objSW.SW_COUNT     = strSwCount;                                   //收文份数
        objSW.SW_DATE      = DateTime.Now.ToString("yyyy-MM-dd HH:00:00"); //收文日期
        objSW.SW_MJ        = strSwMJ;                                      //密级
        objSW.SW_TITLE     = strSwTitle;                                   //收文标题
        objSW.SUBJECT_WORD = strSubWord.Replace(",", ",");                 //主题词
        objSW.SW_SIGN_ID   = strSwSignID;                                  //签收人
        objSW.SW_SIGN_DATE = strSwSignDate;                                //签收日期
        objSW.SW_REG_ID    = LoginID;                                      //登记人ID
        objSW.SW_REG_DATE  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); //登记日期
        objSW.SW_STATUS    = "0";                                          //收文状态
        if (strID == "")
        {
            //新增
            objSW.ID = GetSerialNumber("t_oa_SWInfoID");
            if (new TOaSwInfoLogic().Create(objSW))
            {
                strResult = objSW.ID;
            }
        }
        else
        {
            //修改
            objSW.ID = strID;
            if (new TOaSwInfoLogic().Edit(objSW))
            {
                strResult = objSW.ID;
            }
        }

        return(strResult);
    }
    /// <summary>
    /// 获取断面信息
    /// </summary>
    /// <returns></returns>
    private string getOneGridInfo()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        TOaSwReadVo tr = new TOaSwReadVo();

        tr.REMARK1    = "0";
        tr.SW_PLAN_ID = LogInfo.UserInfo.ID;
        TOaSwInfoVo TOaSwInfoVo = new TOaSwInfoVo();

        DataTable dt = new TOaSwInfoLogic().SelectByTable_ForRead(TOaSwInfoVo, LogInfo.UserInfo.ID, intPageIndex, intPageSize);
        //int intTotalCount = new TOaSwInfoLogic().GetSelectResultCount(TOaSwInfoVo);
        int intTotalCount = new TOaSwReadLogic().GetSelectResultCount(tr);

        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Beispiel #14
0
    public static string saveSWData(string strFROM_CODE, string strSW_CODE, string strSW_TITLE, string strSW_FROM, string strSW_COUNT, string strMJ, string strSW_SIGN_ID, string strSW_SIGN_DATE)
    {
        string      strResult = "";
        TOaSwInfoVo objSW     = new TOaSwInfoVo();

        objSW.FROM_CODE    = strFROM_CODE;
        objSW.SW_CODE      = strSW_CODE;
        objSW.SW_FROM      = strSW_FROM;
        objSW.SW_COUNT     = strSW_COUNT;
        objSW.SW_DATE      = DateTime.Now.ToString("yyyy-MM-dd HH:00:00");
        objSW.SW_TITLE     = strSW_TITLE;
        objSW.SW_MJ        = strMJ;
        objSW.SW_SIGN_ID   = strSW_SIGN_ID;
        objSW.SW_SIGN_DATE = strSW_SIGN_DATE;
        objSW.SW_STATUS    = "0";
        objSW.SW_REG_DATE  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        objSW.ID           = GetSerialNumber("t_oa_SWInfoID");

        if (new TOaSwInfoLogic().Create(objSW))
        {
            strResult = objSW.ID;
        }
        return(strResult);
    }
Beispiel #15
0
 public TOaSwInfoLogic(TOaSwInfoVo _tOaSwInfo)
 {
     tOaSwInfo = _tOaSwInfo;
     access    = new TOaSwInfoAccess();
 }
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tOaSwInfo">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TOaSwInfoVo> SelectByObject(TOaSwInfoVo tOaSwInfo, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_OA_SW_INFO " + this.BuildWhereStatement(tOaSwInfo));

            return(SqlHelper.ExecuteObjectList(tOaSwInfo, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tOaSwInfo">对象条件</param>
        /// <returns>对象</returns>
        public TOaSwInfoVo Details(TOaSwInfoVo tOaSwInfo)
        {
            string strSQL = String.Format("select * from  T_OA_SW_INFO " + this.BuildWhereStatement(tOaSwInfo));

            return(SqlHelper.ExecuteObject(new TOaSwInfoVo(), strSQL));
        }
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tOaSwInfo"></param>
        /// <returns></returns>
        public string BuildWhereStatement_ForRead(TOaSwInfoVo tOaSwInfo)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tOaSwInfo)
            {
                //ID
                if (!String.IsNullOrEmpty(tOaSwInfo.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.ID = '{0}'", tOaSwInfo.ID.ToString()));
                }
                //原文编号
                if (!String.IsNullOrEmpty(tOaSwInfo.FROM_CODE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.FROM_CODE = '{0}'", tOaSwInfo.FROM_CODE.ToString()));
                }
                //收文编号
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_CODE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_CODE = '{0}'", tOaSwInfo.SW_CODE.ToString()));
                }
                //来文单位
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_FROM.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_FROM = '{0}'", tOaSwInfo.SW_FROM.ToString()));
                }
                //收文份数
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_COUNT.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_COUNT = '{0}'", tOaSwInfo.SW_COUNT.ToString()));
                }
                //收文日期
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_DATE = '{0}'", tOaSwInfo.SW_DATE.ToString()));
                }
                //密级
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_MJ.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_MJ = '{0}'", tOaSwInfo.SW_MJ.ToString()));
                }
                //收文标题
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_TITLE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_TITLE like '%{0}%'", tOaSwInfo.SW_TITLE.ToString()));
                }
                //收文类别
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_TYPE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_TYPE = '{0}'", tOaSwInfo.SW_TYPE.ToString()));
                }
                //签收人ID
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_SIGN_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_SIGN_ID = '{0}'", tOaSwInfo.SW_SIGN_ID.ToString()));
                }
                //签收日期
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_SIGN_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_SIGN_DATE = '{0}'", tOaSwInfo.SW_SIGN_DATE.ToString()));
                }
                //登记人ID
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_REG_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_REG_ID = '{0}'", tOaSwInfo.SW_REG_ID.ToString()));
                }
                //登记日期
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_REG_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_REG_DATE = '{0}'", tOaSwInfo.SW_REG_DATE.ToString()));
                }
                //拟办人ID
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_PLAN_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_PLAN_ID = '{0}'", tOaSwInfo.SW_PLAN_ID.ToString()));
                }
                //拟办日期
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_PLAN_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_PLAN_DATE = '{0}'", tOaSwInfo.SW_PLAN_DATE.ToString()));
                }
                //拟办意见
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_PLAN_INFO.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_PLAN_INFO = '{0}'", tOaSwInfo.SW_PLAN_INFO.ToString()));
                }
                //批办人ID
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_PLAN_APP_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_PLAN_APP_ID = '{0}'", tOaSwInfo.SW_PLAN_APP_ID.ToString()));
                }
                //批办日期
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_PLAN_APP_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_PLAN_APP_DATE = '{0}'", tOaSwInfo.SW_PLAN_APP_DATE.ToString()));
                }
                //批办意见
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_PLAN_APP_INFO.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_PLAN_APP_INFO = '{0}'", tOaSwInfo.SW_PLAN_APP_INFO.ToString()));
                }
                //主办人ID
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_APP_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_APP_ID = '{0}'", tOaSwInfo.SW_APP_ID.ToString()));
                }
                //主办日期
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_APP_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_APP_DATE = '{0}'", tOaSwInfo.SW_APP_DATE.ToString()));
                }
                //主办意见
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_APP_INFO.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_APP_INFO = '{0}'", tOaSwInfo.SW_APP_INFO.ToString()));
                }
                //归档人ID
                if (!String.IsNullOrEmpty(tOaSwInfo.PIGONHOLE_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.PIGONHOLE_ID = '{0}'", tOaSwInfo.PIGONHOLE_ID.ToString()));
                }
                //归档时间
                if (!String.IsNullOrEmpty(tOaSwInfo.PIGONHOLE_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.PIGONHOLE_DATE = '{0}'", tOaSwInfo.PIGONHOLE_DATE.ToString()));
                }
                //办理状态
                if (!String.IsNullOrEmpty(tOaSwInfo.SW_STATUS.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sw.SW_STATUS in ({0})", tOaSwInfo.SW_STATUS.ToString()));
                }
                //备注1 传阅日期
                if (!String.IsNullOrEmpty(tOaSwInfo.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND sr.SW_PLAN_DATE = '{0}'", tOaSwInfo.REMARK1.ToString()));
                }

                //主题词
                if (!String.IsNullOrEmpty(tOaSwInfo.SUBJECT_WORD.ToString().Trim()))
                {
                    string   strSUBJECT_WORD = tOaSwInfo.SUBJECT_WORD.ToString().Replace(",", ",");
                    string[] str             = strSUBJECT_WORD.Split(',');
                    for (int i = 0; i < str.Length; i++)
                    {
                        strWhereStatement.Append(string.Format(" AND sw.SUBJECT_WORD like '%{0}%'", str[i].ToString()));
                    }
                }
            }
            return(strWhereStatement.ToString());
        }
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tOaSwInfo">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TOaSwInfoVo tOaSwInfo)
        {
            string strSQL = "select Count(*) from T_OA_SW_INFO " + this.BuildWhereStatement(tOaSwInfo);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Beispiel #20
0
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tOaSwInfo">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TOaSwInfoVo tOaSwInfo)
 {
     return(access.GetSelectResultCount(tOaSwInfo));
 }
    //获取列表信息
    private string getGridInfo(string strStatus)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        TOaSwInfoVo TOaSwInfoVo = new TOaSwInfoVo();

        TOaSwInfoVo.SW_STATUS  = strStatus;
        TOaSwInfoVo.SORT_FIELD = "ID";
        TOaSwInfoVo.SORT_TYPE  = "DESC";
        if (Request["FROMCODE"] != null)
        {
            if (Request["FROMCODE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.FROM_CODE = Request["FROMCODE"].ToString().Trim();
            }
        }
        if (Request["SWCODE"] != null)
        {
            if (Request["SWCODE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SW_CODE = Request["SWCODE"].ToString().Trim();
            }
        }
        if (Request["SWFROM"] != null)
        {
            if (Request["SWFROM"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SW_FROM = Request["SWFROM"].ToString().Trim();
            }
        }
        if (Request["SWTITLE"] != null)
        {
            if (Request["SWTITLE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SW_TITLE = Request["SWTITLE"].ToString().Trim();
            }
        }
        if (Request["SIGNDATE"] != null)
        {
            if (Request["SIGNDATE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SW_SIGN_DATE = Request["SIGNDATE"].ToString().Trim();
            }
        }
        if (Request["SUBJECTWORD"] != null)
        {
            if (Request["SUBJECTWORD"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SUBJECT_WORD = Request["SUBJECTWORD"].ToString().Trim();
            }
        }

        DataTable dt            = new TOaSwInfoLogic().SelectByTable(TOaSwInfoVo, intPageIndex, intPageSize);
        int       intTotalCount = new TOaSwInfoLogic().GetSelectResultCount(TOaSwInfoVo);

        string Json = CreateToJson(dt, intTotalCount);

        return(Json);
    }
Beispiel #22
0
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tOaSwInfo">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TOaSwInfoVo> SelectByObject(TOaSwInfoVo tOaSwInfo, int iIndex, int iCount)
 {
     return(access.SelectByObject(tOaSwInfo, iIndex, iCount));
 }
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tOaSwInfo">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TOaSwInfoVo tOaSwInfo)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tOaSwInfo, TOaSwInfoVo.T_OA_SW_INFO_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 根据对象特征获取单一对象
        /// </summary>
        /// <param name="tOaSwInfo">对象</param>
        /// <returns></returns>
        public TOaSwInfoVo SelectByObject(TOaSwInfoVo tOaSwInfo)
        {
            string strSQL = "select * from T_OA_SW_INFO " + this.BuildWhereStatement(tOaSwInfo);

            return(SqlHelper.ExecuteObject(new TOaSwInfoVo(), strSQL));
        }
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tOaSwInfo"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TOaSwInfoVo tOaSwInfo)
        {
            string strSQL = "select * from T_OA_SW_INFO " + this.BuildWhereStatement(tOaSwInfo);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
Beispiel #26
0
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tOaSwInfo">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TOaSwInfoVo tOaSwInfo, int iIndex, int iCount)
 {
     return(access.SelectByTable(tOaSwInfo, iIndex, iCount));
 }
Beispiel #27
0
 /// <summary>
 /// 获取对象DataTable,指定用户的传阅收文
 /// </summary>
 /// <param name="tOaSwInfo">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable_ForRead(TOaSwInfoVo tOaSwInfo, string strUserID, int iIndex, int iCount)
 {
     return(access.SelectByTable_ForRead(tOaSwInfo, strUserID, iIndex, iCount));
 }
Beispiel #28
0
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TOaSwInfoVo tOaSwInfo)
 {
     return(access.Delete(tOaSwInfo));
 }
    //获取列表信息
    private string getGridInfo(string strStatus)
    {
        //string strSortname = "SW_PLAN_DATE";
        //string strSortorder = "desc";
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        TOaSwInfoVo TOaSwInfoVo = new TOaSwInfoVo();

        TOaSwInfoVo.SW_STATUS  = strStatus;
        TOaSwInfoVo.SORT_FIELD = "READ_DATE";
        TOaSwInfoVo.SORT_TYPE  = "DESC";
        if (Request["FROMCODE"] != null)
        {
            if (Request["FROMCODE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.FROM_CODE = Request["FROMCODE"].ToString().Trim();
            }
        }
        if (Request["SWCODE"] != null)
        {
            if (Request["SWCODE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SW_CODE = Request["SWCODE"].ToString().Trim();
            }
        }
        if (Request["SWFROM"] != null)
        {
            if (Request["SWFROM"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SW_FROM = Request["SWFROM"].ToString().Trim();
            }
        }
        if (Request["SWTITLE"] != null)
        {
            if (Request["SWTITLE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SW_TITLE = Request["SWTITLE"].ToString().Trim();
            }
        }
        if (Request["SIGNDATE"] != null)//传阅日期
        {
            if (Request["SIGNDATE"].ToString().Trim() != "")
            {
                TOaSwInfoVo.REMARK1 = Request["SIGNDATE"].ToString().Trim();
            }
        }
        if (Request["SUBJECTWORD"] != null)
        {
            if (Request["SUBJECTWORD"].ToString().Trim() != "")
            {
                TOaSwInfoVo.SUBJECT_WORD = Request["SUBJECTWORD"].ToString().Trim();
            }
        }

        DataTable dt            = new TOaSwInfoLogic().SelectByTable_ForRead(TOaSwInfoVo, base.LogInfo.UserInfo.ID, intPageIndex, intPageSize);
        int       intTotalCount = new TOaSwInfoLogic().GetSelectResultCount_ForRead(TOaSwInfoVo, base.LogInfo.UserInfo.ID);

        string Json = CreateToJson(dt, intTotalCount);

        return(Json);
    }
Beispiel #30
0
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tOaSwInfo">对象条件</param>
 /// <returns>对象</returns>
 public TOaSwInfoVo Details(TOaSwInfoVo tOaSwInfo)
 {
     return(access.Details(tOaSwInfo));
 }