Exemplo n.º 1
0
        public List<FBEntity> QueryFBEntities(QueryExpression qe)
        {
            try
            {
                using (FBCommonBLL fbCommonBLL = new FBCommonBLL())
                {
                    return fbCommonBLL.QueryFBEntities(qe);
                }
            }
            catch (Exception ex)
            {
                QueryExpression qeTemp = qe;
                string parameter = "";
                while (qeTemp != null)
                {
                    parameter += string.Format("Name:{0} ; Value:{1}  ; QueryType:{2}", qeTemp.PropertyName, qeTemp.PropertyValue, qeTemp.QueryType) + "\r\n";
                    qeTemp = qeTemp.RelatedExpression;
                }

                Tracer.Debug(ex.ToString() + "\r\n参数: " + parameter);
                throw ex;
            }
        }
Exemplo n.º 2
0
        public T_FB_EXTENSIONALORDER UpdateExtensionOrder(string strModelCode, string orderID, string strCheckStates, ref string strMsg)
        {
            using (FBCommonBLL fbCommonBLL = new FBCommonBLL())
            {
                try
                {
                    SystemBLL.Debug("UpdateExtensionOrder方法已被调用,参数:strModelCode: " + strModelCode + ", orderID: " + orderID + ", strCheckStates: " + strCheckStates);

                    QueryExpression queryExpression = QueryExpression.Equal("ORDERID", orderID);

                    if (strModelCode == "Travel")
                    {
                        QueryExpression tempQE = QueryExpression.Equal("TravelSubject", "1");

                        tempQE.RelatedExpression = QueryExpression.Equal("EXTENSIONALTYPECODE", "CCPX");
                        queryExpression.RelatedExpression = tempQE;
                    }
                    //查出保存的外部单据
                    queryExpression.QueryType = typeof(T_FB_EXTENSIONALORDER).Name;
                    queryExpression.IsNoTracking = true;
                    List<FBEntity> listDetail = fbCommonBLL.QueryFBEntities(queryExpression);
                    //如果存在外部单据
                    if (listDetail.Count > 0)
                    {
                        var saveFBEntity = listDetail[0];
                        saveFBEntity.Entity.SetValue("CHECKSTATES", Decimal.Parse(strCheckStates));
                        saveFBEntity.FBEntityState = FBEntityState.Modified;
                        //var temp = fbCommonBLL.FBCommSaveEntity(listDetail[0]);
                        SaveResult temp = new SaveResult();
                        try
                        {
                            temp.FBEntity = fbCommonBLL.SaveT_FB_EXTENSIONALORDER(listDetail[0]);
                            temp.Successful = true;
                        }
                        catch(Exception ex)
                        {
                            temp.Exception = ex.Message;
                            temp.Successful = false;
                        }
                         
                        if (temp.Successful)
                        {
                            return temp.FBEntity.Entity as T_FB_EXTENSIONALORDER;
                        }
                        else
                        {
                            strMsg = temp.Exception;
                        }
                    }
                    else
                    {
                        strMsg = "没有可操作的数据";
                    }
                }
                catch (Exception ex)
                {
                    strMsg = ex.Message;
                    if (!(ex is FBBLLException))
                    {
                        // strMsg = "单据审核异常,请联系管理员";
                        Tracer.Debug("审核" + strModelCode + "的单据[" + orderID + "]出现异常,错误消息为:" + ex.ToString());
                    }
                }
                return null;
            }
        }
Exemplo n.º 3
0
 public List<FBEntity> QueryFBEntities(QueryExpression queryExpression)
 {
     using (FBCommonBLL fbCommonBLL = new FBCommonBLL())
     {
         List<string> listOrder = new List<string>();
         listOrder.Add(typeof(T_FB_EXTENSIONORDERDETAIL).Name);
         listOrder.Add(typeof(T_FB_EXTENSIONALORDER).Name);
         listOrder.Add(typeof(T_FB_EXTENSIONALTYPE).Name);
         if (!listOrder.Contains(queryExpression.QueryType))
         {
             return new List<FBEntity>();
         }
         queryExpression.IsUnCheckRight = true;
         List<FBEntity> listDetail = fbCommonBLL.QueryFBEntities(queryExpression);
         return listDetail;
     }
 }