//获取指定外包单位的资质差新信息
    private void GetJudge()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        string strSelSuppierID = (Request.Params["selSuppierID"] != null) ? Request.Params["selSuppierID"] : "";

        if (strSelSuppierID.Length <= 0)
        {
            Response.Write("");
            return;
        }

        if (strSortname == null || strSortname.Length < 0)
        {
            strSortname = TOaSupplierJudgeVo.ID_FIELD;
        }

        TOaSupplierJudgeVo objJudge = new TOaSupplierJudgeVo();

        objJudge.SUPPLIER_ID = strSelSuppierID;
        objJudge.SORT_FIELD  = strSortname;
        objJudge.SORT_TYPE   = strSortorder;
        TOaSupplierJudgeLogic logicJudge = new TOaSupplierJudgeLogic();

        int       intTotalCount = logicJudge.GetSelectResultCount(objJudge);;//总计的数据条数
        DataTable dt            = logicJudge.SelectByTable_ByJoin(objJudge, intPageIdx, intPagesize);

        string strJson = CreateToJson(dt, intTotalCount);

        Response.Write(strJson);
    }
Beispiel #2
0
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tOaSupplierJudge">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TOaSupplierJudgeVo tOaSupplierJudge, int iIndex, int iCount)
        {
            string strSQL = " select * from T_OA_SUPPLIER_JUDGE {0} ";

            strSQL = String.Format(strSQL, BuildWhereStatement(tOaSupplierJudge));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
    public static string deleteSupplier(string strDelIDs)
    {
        if (strDelIDs.Length == 0)
        {
            return("0");
        }

        string[] arrDelIDs = strDelIDs.Split(',');

        bool isSuccess = true;

        for (int i = 0; i < arrDelIDs.Length; i++)
        {
            isSuccess = new TOaSupplierInfoLogic().Delete(arrDelIDs[i]);
            if (isSuccess)
            {
                new PageBase().WriteLog("删除服务商", "", new UserLogInfo().UserInfo.USER_NAME + "删除服务商" + strDelIDs);
            }
            TOaSupplierJudgeVo objJudge = new TOaSupplierJudgeVo();
            objJudge.SUPPLIER_ID = arrDelIDs[i];
            if (new TOaSupplierJudgeLogic().Delete(objJudge))
            {
                new PageBase().WriteLog("删除服务商产品评价", "", new UserLogInfo().UserInfo.USER_NAME + "删除服务商产品评价" + objJudge.ID);
            }
        }

        if (isSuccess)
        {
            return("1");
        }
        else
        {
            return("0");
        }
    }
Beispiel #4
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tOaSupplierJudge_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tOaSupplierJudge_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TOaSupplierJudgeVo tOaSupplierJudge_UpdateSet, TOaSupplierJudgeVo tOaSupplierJudge_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tOaSupplierJudge_UpdateSet, TOaSupplierJudgeVo.T_OA_SUPPLIER_JUDGE_TABLE);

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

            strSQL += string.Format(" where ID='{0}' ", tOaSupplierJudge.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
    public static string EditJudge(string strID, string strPARTNAME, string strMODEL, string strREFERENCEPRICE, string strPRODUCTSTANDARD, string strDELIVERYPERIOD,
                                   string strQUANTITY, string strENTERPRISECODE, string strQUATITYSYSTEM, string strSINCERITY)
    {
        bool isSuccess = true;

        TOaSupplierJudgeVo objJudge = new TOaSupplierJudgeVo();

        objJudge.ID              = strID;
        objJudge.PARTNAME        = strPARTNAME;
        objJudge.MODEL           = strMODEL;
        objJudge.REFERENCEPRICE  = strREFERENCEPRICE;
        objJudge.PRODUCTSTANDARD = strPRODUCTSTANDARD;
        objJudge.DELIVERYPERIOD  = strDELIVERYPERIOD;
        objJudge.QUANTITY        = strQUANTITY;
        objJudge.ENTERPRISECODE  = strENTERPRISECODE;
        objJudge.QUATITYSYSTEM   = strQUATITYSYSTEM;
        objJudge.SINCERITY       = strSINCERITY;

        isSuccess = new TOaSupplierJudgeLogic().Edit(objJudge);

        if (isSuccess)
        {
            new PageBase().WriteLog("编辑服务商的评价信息", "", new UserLogInfo().UserInfo.USER_NAME + "编辑服务商的评价信息" + objJudge.ID);
            return("1");
        }
        else
        {
            return("0");
        }
    }
Beispiel #7
0
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TOaSupplierJudgeVo tOaSupplierJudge)
        {
            string strSQL = "delete from T_OA_SUPPLIER_JUDGE ";

            strSQL += this.BuildWhereStatement(tOaSupplierJudge);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Beispiel #8
0
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tBaseItemAnalysis">对象</param>
        /// <returns>返回行数</returns>
        public DataTable SelectByTable_ByJoin(TOaSupplierJudgeVo tOaSupplierJudge, int iIndex, int iCount)
        {
            string strSQL1 = " select * from T_OA_SUPPLIER_JUDGE {0} ";

            strSQL1 = String.Format(strSQL1, BuildWhereStatement(tOaSupplierJudge));
            string strSQL = "select a.SUPPLIER_NAME,i.* from (" + strSQL1 + ")i";

            strSQL += " join T_OA_SUPPLIER_INFO a on a.id=i.SUPPLIER_ID";
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
 public TOaSupplierJudgeLogic(TOaSupplierJudgeVo _tOaSupplierJudge)
 {
     tOaSupplierJudge = _tOaSupplierJudge;
     access           = new TOaSupplierJudgeAccess();
 }
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tOaSupplierJudge">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TOaSupplierJudgeVo tOaSupplierJudge)
 {
     return(access.GetSelectResultCount(tOaSupplierJudge));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tOaSupplierJudge_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tOaSupplierJudge_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TOaSupplierJudgeVo tOaSupplierJudge_UpdateSet, TOaSupplierJudgeVo tOaSupplierJudge_UpdateWhere)
 {
     return(access.Edit(tOaSupplierJudge_UpdateSet, tOaSupplierJudge_UpdateWhere));
 }
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TOaSupplierJudgeVo tOaSupplierJudge)
 {
     return(access.Delete(tOaSupplierJudge));
 }
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TOaSupplierJudgeVo tOaSupplierJudge)
 {
     return(access.Create(tOaSupplierJudge));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tOaSupplierJudge">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TOaSupplierJudgeVo tOaSupplierJudge)
 {
     return(access.Edit(tOaSupplierJudge));
 }
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tOaSupplierJudge">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TOaSupplierJudgeVo tOaSupplierJudge, int iIndex, int iCount)
 {
     return(access.SelectByTable(tOaSupplierJudge, iIndex, iCount));
 }
Beispiel #16
0
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tOaSupplierJudge">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TOaSupplierJudgeVo tOaSupplierJudge)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tOaSupplierJudge, TOaSupplierJudgeVo.T_OA_SUPPLIER_JUDGE_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tOaSupplierJudge">对象条件</param>
 /// <returns>对象</returns>
 public TOaSupplierJudgeVo Details(TOaSupplierJudgeVo tOaSupplierJudge)
 {
     return(access.Details(tOaSupplierJudge));
 }
Beispiel #18
0
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tOaSupplierJudge">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TOaSupplierJudgeVo> SelectByObject(TOaSupplierJudgeVo tOaSupplierJudge, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_OA_SUPPLIER_JUDGE " + this.BuildWhereStatement(tOaSupplierJudge));

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

            return(SqlHelper.ExecuteObject(new TOaSupplierJudgeVo(), strSQL));
        }
Beispiel #20
0
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tOaSupplierJudge">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TOaSupplierJudgeVo tOaSupplierJudge)
        {
            string strSQL = "select Count(*) from T_OA_SUPPLIER_JUDGE " + this.BuildWhereStatement(tOaSupplierJudge);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Beispiel #21
0
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tOaSupplierJudge"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TOaSupplierJudgeVo tOaSupplierJudge)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tOaSupplierJudge)
            {
                //编号
                if (!String.IsNullOrEmpty(tOaSupplierJudge.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tOaSupplierJudge.ID.ToString()));
                }
                //供应商ID
                if (!String.IsNullOrEmpty(tOaSupplierJudge.SUPPLIER_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SUPPLIER_ID = '{0}'", tOaSupplierJudge.SUPPLIER_ID.ToString()));
                }
                //物料名称
                if (!String.IsNullOrEmpty(tOaSupplierJudge.PARTNAME.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND PARTNAME = '{0}'", tOaSupplierJudge.PARTNAME.ToString()));
                }
                //规格型号
                if (!String.IsNullOrEmpty(tOaSupplierJudge.MODEL.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MODEL = '{0}'", tOaSupplierJudge.MODEL.ToString()));
                }
                //参考价
                if (!String.IsNullOrEmpty(tOaSupplierJudge.REFERENCEPRICE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REFERENCEPRICE = '{0}'", tOaSupplierJudge.REFERENCEPRICE.ToString()));
                }
                //产品标准
                if (!String.IsNullOrEmpty(tOaSupplierJudge.PRODUCTSTANDARD.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND PRODUCTSTANDARD = '{0}'", tOaSupplierJudge.PRODUCTSTANDARD.ToString()));
                }
                //最短供货期
                if (!String.IsNullOrEmpty(tOaSupplierJudge.DELIVERYPERIOD.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND DELIVERYPERIOD = '{0}'", tOaSupplierJudge.DELIVERYPERIOD.ToString()));
                }
                //供货数量
                if (!String.IsNullOrEmpty(tOaSupplierJudge.QUANTITY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND QUANTITY = '{0}'", tOaSupplierJudge.QUANTITY.ToString()));
                }
                //供应商编码
                if (!String.IsNullOrEmpty(tOaSupplierJudge.ENTERPRISECODE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ENTERPRISECODE = '{0}'", tOaSupplierJudge.ENTERPRISECODE.ToString()));
                }
                //质量保证体系
                if (!String.IsNullOrEmpty(tOaSupplierJudge.QUATITYSYSTEM.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND QUATITYSYSTEM = '{0}'", tOaSupplierJudge.QUATITYSYSTEM.ToString()));
                }
                //合同信守情况
                if (!String.IsNullOrEmpty(tOaSupplierJudge.SINCERITY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SINCERITY = '{0}'", tOaSupplierJudge.SINCERITY.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tOaSupplierJudge.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tOaSupplierJudge.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tOaSupplierJudge.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tOaSupplierJudge.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tOaSupplierJudge.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tOaSupplierJudge.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tOaSupplierJudge.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tOaSupplierJudge.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tOaSupplierJudge.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tOaSupplierJudge.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tOaSupplierJudge">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TOaSupplierJudgeVo> SelectByObject(TOaSupplierJudgeVo tOaSupplierJudge, int iIndex, int iCount)
 {
     return(access.SelectByObject(tOaSupplierJudge, iIndex, iCount));
 }
Beispiel #23
0
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tOaSupplierJudge"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TOaSupplierJudgeVo tOaSupplierJudge)
        {
            string strSQL = "select * from T_OA_SUPPLIER_JUDGE " + this.BuildWhereStatement(tOaSupplierJudge);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tOaSupplierJudge"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TOaSupplierJudgeVo tOaSupplierJudge)
 {
     return(access.SelectByTable(tOaSupplierJudge));
 }
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tOaSupplierJudge">对象</param>
 /// <returns></returns>
 public TOaSupplierJudgeVo SelectByObject(TOaSupplierJudgeVo tOaSupplierJudge)
 {
     return(access.SelectByObject(tOaSupplierJudge));
 }