コード例 #1
0
ファイル: ExchangeReview.cs プロジェクト: cafc79/SIA
        public errorCompositeType UpdateExchangeReview(ExchangeReviewCompositeType erct)
        {
            var lstError = new errorCompositeType();

            try
            {
                bool bStatus = true;
                param    = new SqlParameter[3];
                param[0] = new SqlParameter("@fvobservation_review_Exchange", SqlDbType.VarChar)
                {
                    Value = erct.sDescription
                };
                param[1] = new SqlParameter("@fiid_review_type", SqlDbType.Int)
                {
                    Value = erct.iIdReviewType
                };
                param[2] = new SqlParameter("@fiid_review_exchange", SqlDbType.Int)
                {
                    Value = erct.iIdReviewExchange
                };
                objDB.ExecStoredIUD("sp_updateReviewExchange", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
コード例 #2
0
ファイル: ExchangeReview.cs プロジェクト: cafc79/SIA
        public ExchangeReviewCompositeType GetExchangeReviewById(int idExchange, int iIdUser)
        {
            param    = new SqlParameter[2];
            param[0] = new SqlParameter("@fiid_Exchange", SqlDbType.Int)
            {
                Value = idExchange
            };
            param[1] = new SqlParameter("@fiid_user", SqlDbType.Int)
            {
                Value = iIdUser
            };
            var dt   = objDB.ExecStore("sp_selectReviewExchangeByIdExchangeIdUser", param);
            var erct = new ExchangeReviewCompositeType
            {
                iIdReviewExchange = int.Parse(dt.Rows[0].ItemArray[0].ToString()),
                sDescription      = dt.Rows[0].ItemArray[1].ToString(),
                iIdReviewType     = int.Parse(dt.Rows[0].ItemArray[2].ToString()),
                iIdExchange       = int.Parse(dt.Rows[0].ItemArray[3].ToString()),
                iIdUser           = int.Parse(dt.Rows[0].ItemArray[4].ToString()),
                bStatus           = bool.Parse(dt.Rows[0].ItemArray[5].ToString()),
                sReview           = dt.Rows[0].ItemArray[6].ToString(),
                sCompleteName     = dt.Rows[0].ItemArray[7].ToString()
            };

            return(erct);
        }