示例#1
0
        public JsonResult LoadPendingCount()
        {
            string       strErrText;
            CommonSystem common = new CommonSystem();
            PendingCount data   = common.LoadPendingCount(LoginAccountId, LoginStaffName, out strErrText);

            if (data == null)
            {
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
            else
            {
                var ret = new
                {
                    SubmitDeliverPlansCount        = data.SubmitDeliverPlansCount,
                    CustomerApprovePaperPlansCount = data.CustomerApprovePaperPlansCount,
                    ApproveDeliverPlansCount       = data.ApproveDeliverPlansCount,
                    DispatchDeliverPlansCount      = data.DispatchDeliverPlansCount,
                    SubmitDispatchBillsCount       = data.SubmitDispatchBillsCount,
                    DispatchBillsForPrintDispatchedShipmentBillCount = data.DispatchBillsForPrintDispatchedShipmentBillCount,
                    PrintAllocateShipmentBillsCount = data.PrintAllocateShipmentBillsCount,
                    SubmitShipmentBillsCount        = data.SubmitShipmentBillsCount,
                    PrintDeliverBillsCount          = data.PrintDeliverBillsCount,
                    ReceiptDeliverBillsCount        = data.ReceiptDeliverBillsCount,
                    NewContractsCount     = data.NewContractsCount,
                    SubmitContractsCount  = data.SubmitContractsCount,
                    PrintContractsCount   = data.PrintContractsCount,
                    ApproveContractsCount = data.ApproveContractsCount,
                    ReverseContractsCount = data.ReverseContractsCount,
                    FineContractsCount    = data.FineContractsCount
                };
                return(Json(ret, JsonRequestBehavior.AllowGet));
            }
        }
示例#2
0
        /// <summary>
        /// 读取待处理业务个数
        /// </summary>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public PendingCount LoadPendingCount(long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                PendingCount dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (CommonDAO dao = new CommonDAO())
                    {
                        dataResult = dao.LoadPendingCount(nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return(dataResult);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(null);
            }
        }