Ejemplo n.º 1
0
        public void GetVendorList(DataTable dtTemp, string sTenderID)
        {
            string    strSQL = "SELECT ITBVendorList.VendorID FROM TCStrategyVendor,Vendor WHERE TCStrategyVendor.VendorCode = Vendor.ITBIDKey AND ITBDocument.TenderID = '" + sTenderID + "'";
            DataTable dt     = _da.GetDataTable(strSQL);
            int       nCount = dt.Rows.Count;

            for (int i = 0; i < nCount; i++)
            {
                DataRow dr = dtTemp.NewRow();
                dr["IDKey"]     = System.Guid.NewGuid().ToString();
                dr["VendorID"]  = dt.Rows[i][0].ToString();
                dr["RowStatus"] = "New";
                dtTemp.Rows.Add(dr);
            }
        }
Ejemplo n.º 2
0
        public string SetSRAndITBDocumentState(string strITBDocumentID, int nState)
        {
            string strErrorMsg = string.Empty;

            string UpdateSql = "UPDATE ITBDocument SET State = " + nState + " WHERE ITBIDKey = '" + strITBDocumentID + "'";

            strErrorMsg = _da.ExecuteDMLSQL(UpdateSql);

            string UpdateTCstate = "UPDATE TCStrategy SET status = " + nState + " WHERE TCStrategy.TenderID in (SELECT TenderID From ITBDocument WHERE ITBIDKey = '" + strITBDocumentID + "') ";

            strErrorMsg += _da.ExecuteDMLSQL(UpdateTCstate);

            string SelectChildSR = "SELECT SRID FROM TCStrategySR,ITBDocument WHERE TCStrategySR.TenderID =ITBDocument.TenderID AND  ITBIDKey = '" + strITBDocumentID + "'";

            DataTable dtSR = _da.GetDataTable(SelectChildSR);

            for (int i = 0; i < dtSR.Rows.Count; i++)
            {
                string UpdateTenderState = "UPDATE ServiceRequistion SET SRState = " + nState + " WHERE SRID = '" + dtSR.Rows[i][0].ToString() + "'";
                strErrorMsg += _da.ExecuteDMLSQL(UpdateTenderState);
            }
            return(strErrorMsg);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 判断 当前的单位是否在子表中已经存在(IsBaseUOM = 0)
        /// </summary>
        /// <param name="sPKValue"></param>
        /// <returns></returns>
        public string IsUOMID(string sPKValue)
        {
            string    sSql = "SELECT UOMID FROM MaterialUOM WHERE ItemCode = '" + sPKValue + "' AND IsBaseUOM = 0";
            DataTable dt   = _da.GetDataTable(sSql);

            if (dt.Rows.Count > 0)
            {
                return("NoMaterialSelected");
            }
            else
            {
                return("");
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        ///  wether one node has children
        /// </summary>
        /// <param name="idKey">Bi_department's pk</param>
        /// <returns></returns>
        public bool HashChildren(string strConID)
        {
            string sql = "";

            sql = "select count(*) from BT_SRPlanType where ParentID  = '" + strConID + "'";
            System.Data.DataTable dt = _da.GetDataTable(sql);
            if ((int)dt.Rows[0][0] > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 5
0
        public DataTable GetSRTCInfo(string sTenderID, string sCurrentUser, bool bolValue)
        {
            if (bolValue)
            {
                strSql = "SELECT TCStrategy.ProTypeName,TCStrategy.ProTypeName,TCStrategy.PlanAmount,TCStrategy.Currency,TCStrategy.TenderID,TCStrategy.ProjectName " +
                         " FROM  TCStrategy " +
                         " WHERE TCStrategy.TenderID = '" + sTenderID + "'";

                DataTable dt = _da.GetDataTable(strSql);
                if (dt.Rows.Count > 0)
                {
                    return(dt);
                }
            }
            return(null);
        }