예제 #1
0
파일: FBCommonBLL.cs 프로젝트: JuRogn/OA
        /// <summary>
        /// 保存实体
        /// </summary>
        /// <param name="fbEntityList"></param>
        /// <returns></returns>
        public SaveResult Save(SaveEntity saveEntity)
        {

            SaveResult result = new SaveResult();
            try
            {
                result.FBEntity = base.SaveEntityBLLSave(saveEntity);
                result.Successful = true;
            }
            catch (FBBLLException ex)
            {
                result.Successful = false;
                result.Exception = ex.Message;
                SystemBLL.Debug(ex.ToString());

            }
            return result;
        }
예제 #2
0
파일: FBService.svc.cs 프로젝트: JuRogn/OA
        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;
            }
        }
예제 #3
0
파일: FBService.svc.cs 프로젝트: JuRogn/OA
        public SaveResult Save(SaveEntity saveEntity)
        {
            using (FBCommonBLL fbCommonBLL = new FBCommonBLL())
            {
                SaveResult result = new SaveResult();
                try
                {
                    result = fbCommonBLL.Save(saveEntity);
                }
                catch (Exception ex)
                {
                    result.Successful = false;
                    result.Exception = ex.Message;
                    Tracer.Debug(ex.ToString());

                }
                return result;
            }
        }
예제 #4
0
파일: FBService.svc.cs 프로젝트: JuRogn/OA
 public SaveResult Save(FBEntity fbEntity)
 {
     SaveResult result = new SaveResult();
     try
     {
         using (FBCommonBLL fbCommonBLL = new FBCommonBLL())
         {
             result = fbCommonBLL.FBCommSaveEntity(fbEntity);
         }
     }
     catch (Exception ex)
     {
         result.Successful = false;
         result.Exception = ex.Message;
     }
     return result;
 }
예제 #5
0
 public SaveResult Save(FBEntity fbEntity)
 {
     SaveResult result = new SaveResult();
     try
     {
         using (FBCommonBLL fbCommonBLL = new FBCommonBLL())
         {
             fbCommonBLL.BeginTransaction();
             result = fbCommonBLL.FBCommSaveEntity(fbEntity);
             if (result.Successful)
             {
                 fbCommonBLL.CommitTransaction();
             }
         }
     }
     catch (Exception ex)
     {
         result.Successful = false;
         result.Exception = ex.Message;
         Tracer.Debug(ex.ToString());
     }
     return result;
 }