Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MshSegment"/> class.
 /// </summary>
 /// <param name="dateTimeOfMessage">MSH.7 - Date/Time of Message.</param>
 /// <param name="messageType">MSH.9 - Message Type.</param>
 /// <param name="messageControlId">MSH.10 - Message Control ID.</param>
 /// <param name="processingId">MSH.11 - Processing ID.</param>
 public MshSegment(DateTime dateTimeOfMessage, MessageType messageType, string messageControlId, ProcessingType processingId)
 {
     DateTimeOfMessage = dateTimeOfMessage;
     MessageType       = messageType;
     MessageControlId  = messageControlId;
     ProcessingId      = processingId;
 }
Esempio n. 2
0
        private void bwAsync_Worker(object sender, DoWorkEventArgs e)
        {
            ProcessingType type = (ProcessingType)e.Argument;

            e.Result = type;

            switch (type)
            {
            case ProcessingType.SaveData:
            {
                if (mIntent_Request.Intent_RequestID > 0)
                {
                    Intent_RequestPresenter.UpdateIntent_Request(mIntent_Request);
                }
                else
                {
                    Intent_RequestPresenter.InsertIntent_Request(mIntent_Request);
                }
            }
            break;

            default:
                break;
            }
        }
Esempio n. 3
0
 private void bwAsync_Start(ProcessingType type)
 {
     if (!mThread.IsBusy)
     {
         mThread.RunWorkerAsync(type);
     }
 }
Esempio n. 4
0
 private void bwAsync_Start(ProcessingType type)
 {
     if (!m_AsyncWorker.IsBusy)
     {
         m_AsyncWorker.RunWorkerAsync(type);
     }
 }
Esempio n. 5
0
        private void bwAsync_Worker(object sender, DoWorkEventArgs e)
        {
            ProcessingType type = (ProcessingType)e.Argument;

            e.Result = type;

            switch (type)
            {
            case ProcessingType.SaveData:
            {
                //if (mHocSinh.HocSinhID > 0)
                //{
                //    HocSinhPresenter.UpdateHocSinh(mHocSinh);
                //}
                //else
                //{
                //    HocSinhPresenter.InsertHocSinh(mHocSinh);
                //}
            }
            break;

            default:
                break;
            }
        }
Esempio n. 6
0
        private void bwAsync_Worker(object sender, DoWorkEventArgs e)
        {
            ProcessingType type = (ProcessingType)e.Argument;

            e.Result = type;

            switch (type)
            {
            case ProcessingType.SaveData:
            {
                if (mDevice.DeviceID > 0)
                {
                    DevicePresenter.UpdateDevice(mDevice);
                }
                else
                {
                    DevicePresenter.InsertDevice(mDevice);
                }
            }
            break;

            default:
                break;
            }
        }
Esempio n. 7
0
        /// <summary>
        /// Read message string from media
        /// </summary>
        /// <param name="bufferLen">Length of buffer</param>
        public virtual void MessageString(int bufferLen)
        {
            int offset = 0;

            while ((offset + 8) < bufferLen)
            {
                byte[] messageBytes = new byte[8];
                if (this.HostObject.Read(messageBytes, 0, messageBytes.Length) < messageBytes.Length)
                {
                    break;
                }

                byte byteEx = this.ExtractEx(messageBytes);
                if (byteEx == 0)
                {
                }
                this.ExtractedMessage.WriteByte(byteEx);

                if (this.ExtractedMessage.TotalLength <= this.ExtractedMessage.CurrentLength)
                {
                    this._processing = ProcessingType.Done;
                    return;
                }

                offset += 8;
            }
        }
Esempio n. 8
0
        private void bwAsync_Worker(object sender, DoWorkEventArgs e)
        {
            ProcessingType type = (ProcessingType)e.Argument;

            e.Result = type;

            switch (type)
            {
            case ProcessingType.SaveData:
            {
                if (mDM_Entity_Type.DM_Entity_TypeID > 0)
                {
                    DM_Entity_TypePresenter.UpdateDM_Entity_Type(mDM_Entity_Type);
                }
                else
                {
                    if (DM_Entity_TypePresenter.InsertDM_Entity_Type(mDM_Entity_Type) > 0)
                    {
                        //Tăng số ID lên
                        mDM_Entity_Type.DM_Entity_TypeID = mDM_Entity_Type.DM_Entity_TypeDBID + 500 + mDM_Entity_Type.DM_Intent_TypeID * 1000;
                        DM_Entity_TypePresenter.UpdateDM_Entity_Type(mDM_Entity_Type);
                    }
                }
            }
            break;

            default:
                break;
            }
        }
Esempio n. 9
0
        /// <summary>
        /// Hide data in buffer
        /// </summary>
        /// <param name="buffer">Buffer in which data is to be hidden</param>
        /// <param name="bufferLen">Length of buffer</param>
        protected virtual unsafe int HideData(byte *buffer, int bufferLen)
        {
            int offset = 0;

            while ((offset + 8) < bufferLen)
            {
                iter++;

                int next = this._message.NextByte();
                if (next == -1)
                {
                    this._processing = ProcessingType.Done;
                    ///No more data to hide
                    break;
                }
                byte data = (byte)next;

                ///Get 8 bytes of cover message and
                ///hide a byte of data in it
                for (int i = 0; i < 8; i++)
                {
                    byte cover = buffer[offset];

                    ///Right shift the data to get next byte and AND with 1 = 00000001
                    Substitution.LsbSubstitute(ref cover, (byte)(((data >> i) & 0x1)));

                    buffer[offset] = cover;
                    offset++;
                }
            }

            return(offset);
        }
Esempio n. 10
0
        public void Parse_WhenCalled_ParsesData(char input, ProcessingType expected)
        {
            //act
            var actual = ProcessingType.Parse(input);

            //assert
            Assert.Equal(expected, actual);
        }
Esempio n. 11
0
        private void createPanelsButton_Click(object sender, EventArgs e)
        {
            ProcessingAction = ProcessingType.PanelCreation;

            // Open up next form to get further information
            Form startingQuestionIdForm = new StartQuestionIdForm(this);

            startingQuestionIdForm.Show();
        }
Esempio n. 12
0
 public ProcessingObject(bool enabled, int itemId, ProcessingType processingType, int minCount, int[] resultItemIds, string comment)
 {
     Enabled        = enabled;
     ItemId         = itemId;
     ProcessingType = processingType;
     MinCount       = minCount;
     ResultItemIds  = resultItemIds;
     Comment        = comment;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        // Set body to submit onload
        body.Attributes.Add("onload", "document.forms[0].submit()");

        // Set form action and method
        paypalForm.Action = "https://www.sandbox.paypal.com/cgi-bin/webscr"; // TEST URL
        paypalForm.Method = "POST";

        // Retrieve donations from the session
        var donations = BusinessLogic.Donation.GetDonations();

        // Determine donation type
        if (donations.Count() > 1)
        {
            this.processingType = ProcessingType.Cart;
        }
        else
        {
            if (donations.First().DonationType == "Special")
            {
                this.processingType = ProcessingType.OneTime;
            }
            else
            {
                this.processingType = ProcessingType.Recurring;
            }
        }

        // Create collection to store values in
        Dictionary<string, string> formValues = new Dictionary<string, string>();

        // Set default values
        formValues.Add("business", "*****@*****.**");
        formValues.Add("no_shipping", "2");
        formValues.Add("currency_code", "USD");
        formValues.Add("tax", "0");
        formValues.Add("no_note", "1");

        // Add type specific values to collection
        var addedFormValues = this.AddTypeSpecificValues(donations);
        addedFormValues.ToList().ForEach(x => formValues.Add(x.Key, x.Value));

        // Add hidden fields to form
        foreach (KeyValuePair<string, string> pair in formValues)
        {
            HiddenField field = new HiddenField();
            field.ID = (string)pair.Key;
            field.Value = (string)pair.Value;

            paypalForm.Controls.Add(field);
        }

        // Clear session so that donations are not saved when the user returns
        BusinessLogic.Donation.ClearDonations();
    }
Esempio n. 14
0
 /// <summary>
 /// Gets the default upper memory limit for a particular type of processing.
 /// </summary>
 /// <param name="channel">The channel to set the limit for.</param>
 /// <param name="processingType">The processing type.</param>
 /// <returns>The amount of memory in bytes. This should be a power of two.</returns>
 public virtual int GetMaxMemoryFor(Connection channel, ProcessingType processingType)
 {
     // If it's a mesh binding
     if (channel.Binding is MeshBinding)
     {
         return(1 << (BuddyBlock.DefaultMaxMemory + 4));  // 2^26 = 64 MB
     }
     // If it's a normal binding
     return(1 << BuddyBlock.DefaultMaxMemory);  // 2 ^ 22 = 4 MB
 }
Esempio n. 15
0
 private void bwAsync_Start(ProcessingType type)
 {
     if (!mThread.IsBusy)
     {
         if (type == ProcessingType.LoadData)
         {
             DataProgress.Visible = DataProgress.IsRunning = true;
         }
         mThread.RunWorkerAsync(type);
     }
 }
        GetDeltaBasedController <TDeltaArtefact, TModel, TProgramDelta, TTestCase, TResult, TResultArtefact, TVisualizationArtefact>
            (RTSApproachType rtsApproachType, ProcessingType processingType, bool withTimeLimit)
            where TTestCase : ITestCase
            where TModel : IProgramModel
            where TProgramDelta : IDelta <TModel>
            where TResult : ITestProcessingResult
        {
            var factory = container.Resolve <Func <RTSApproachType, ProcessingType, bool, DeltaBasedController <TDeltaArtefact, TModel, TProgramDelta, TTestCase, TResult, TResultArtefact, TVisualizationArtefact> > >();

            return(factory(rtsApproachType, processingType, withTimeLimit));
        }
Esempio n. 17
0
        /// <summary>
        /// Extract data from buffer
        /// </summary>
        /// <param name="buffer">Buffer from which data is to be extracted</param>
        /// <param name="bufferLen">Length of buffer</param>
        protected virtual void ExtractData(byte[] buffer, int bufferLen)
        {
            int keyLen = 0, messageLen = 0;

            string sKey = string.Empty;

            this.HostObject.SetFrame(buffer);

            ///Read key length
            keyLen = this.ExtractLength(this.HostObject);

            ///This means that the host object does not contain valid key.
            if (keyLen < Message.MIN_KEY_LEN || keyLen > Message.MAX_KEY_LEN)
            {
                this._processing = ProcessingType.Done;
                return;
            }

            ///Prepare a buffer to read key
            byte[] data = new byte[keyLen];

            for (int i = 0; i < keyLen; i++)
            {
                byte[] keyBytes = new byte[8];
                this.HostObject.Read(keyBytes, 0, keyBytes.Length);

                data[i] = this.ExtractEx(keyBytes);
            }

            ///Convert bytes to key string
            sKey = Encoding.UTF8.GetString(data);

            ///Keys do not compare
            if (sKey.CompareTo(this._key) != 0)
            {
                this._processing = ProcessingType.Done;
                return;
            }

            ///Now read the message length
            messageLen = this.ExtractLength(this.HostObject);

            if (messageLen == 0)
            {
                this.ExtractedMessage = new Message(sKey, string.Empty);
                this._processing      = ProcessingType.Done;
                return;
            }

            this.ExtractedMessage = new BinaryMessage(messageLen);
            this.MessageString(bufferLen);
        }
Esempio n. 18
0
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            IType hl7Type = new ProcessingType
            {
                ProcessingId   = "1",
                ProcessingMode = "2"
            };

            string expected = "1^2";
            string actual   = hl7Type.ToDelimitedString();

            Assert.Equal(expected, actual);
        }
Esempio n. 19
0
        public long Calculate(long number, ProcessingType processingType)
        {
            if (processingType == ProcessingType.Busy)
            {
                return(BusyFibonacci(number));
            }
            else if (processingType == ProcessingType.Sleepy)
            {
                return(SleepyFibonacci(number));
            }

            throw new Exception("Unsuported processing type");
        }
Esempio n. 20
0
    IProcessor Create(ProcessingType type)
    {
        IProcessor processor = null;

        // switch statement or perhaps indivual factory implementations for each processor type.
        // pick your poison
        switch (type)
        {
        case ProcessingType.Default:
            processor = new DefaultProcessor();
            break;
            ...etc.
        }
Esempio n. 21
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            IType expected = new ProcessingType
            {
                ProcessingId   = "1",
                ProcessingMode = "2"
            };

            IType actual = new ProcessingType();

            actual.FromDelimitedString("1^2");

            expected.Should().BeEquivalentTo(actual);
        }
        private static IEnumerable <Operation> CreateOperations(ProcessingType processingType)
        {
            var operations = new List <Operation>();

            var op1 = new Operation
            {
                OperationName  = "Operation 1",
                ProcessingType = processingType
            };

            operations.Add(op1);

            return(operations);
        }
Esempio n. 23
0
        private void bwAsync_Worker(object sender, DoWorkEventArgs e)
        {
            ProcessingType type = (ProcessingType)e.Argument;

            e.Result = type;

            switch (type)
            {
            case ProcessingType.LoadData:
            {
                mListIntent = IntentPresenter.GetIntents();

                int index = 1;
                foreach (Intent data in mListIntent)
                {
                    data.STT = index;
                    index++;
                }
            }
            break;

            case ProcessingType.CapNhat:
            {
                foreach (DM_Intent_Type data in DM_Intent_Type.GetDefaultList(0))
                {
                    Intent mIntent = mListIntent.FirstOrDefault(p => p.DM_Intent_TypeID == data.DM_Intent_TypeID);
                    if (mIntent == null)
                    {
                        mIntent = new Intent();
                        mIntent.DM_Intent_TypeID = data.DM_Intent_TypeID;
                        mIntent.IntentName       = data.DM_Intent_TypeName;
                        IntentPresenter.InsertIntent(mIntent);
                    }
                    else
                    {
                        if (mIntent.IntentName != data.DM_Intent_TypeName)
                        {
                            mIntent.IntentName = data.DM_Intent_TypeName;
                            IntentPresenter.UpdateIntent(mIntent);
                        }
                    }
                }
            }
            break;

            default:
                break;
            }
        }
Esempio n. 24
0
        public IMixxxProcessor GetProcessor(ProcessingType processingType,
                                            IDataHandler dataHandler, IFile file)
        {
            switch (processingType)
            {
            case ProcessingType.PushToMixxx:
                return(new MixxxPushProcessor(dataHandler, file));

            case ProcessingType.PullFromMixxx:
                return(new MixxxPullProcessor(dataHandler, file));

            default:
                return(null);
            }
        }
Esempio n. 25
0
        /// <summary>
        /// Hide the message in cover object and write the stego object
        /// on given path
        /// </summary>
        /// <param name="message">Message to be hidden</param>
        /// <param name="sinkPath">Path at which stego object will be written</param>
        public override void Hide(Message message, string sinkPath)
        {
            this._processing = ProcessingType.Hide;
            this._message    = message;

            try
            {
                this.BuildGraph(sinkPath);
                this.Run();
            }
            catch (Exception)
            {
                this._processing = ProcessingType.Done;
                throw;
            }
        }
Esempio n. 26
0
		public override bool ProcessWordByWord(OfficeDocumentProcessor aWordProcessor, ProcessingType eType)
		{
			if (aWordProcessor.AreLeftOvers)
			{
				DialogResult res = MessageBox.Show("Click 'Yes' to restart where you left off, 'No' to start over at the top, and 'Cancel' to quit", Connect.cstrCaption, MessageBoxButtons.YesNoCancel);
				if (res == DialogResult.No)
					aWordProcessor.LeftOvers = null;
				if (res == DialogResult.Cancel)
					return true;
			}

			if (eType == ProcessingType.eWordByWord)
				return ProcessParagraphs(aWordProcessor, Document.Paragraphs);
			else
				return ProcessParagraphsIsoFormat(aWordProcessor, Document.Paragraphs);
		}
Esempio n. 27
0
        public static void AddTableLog(OperationType operationType, string blobPath, ProcessingType type, OperationResult result)
        {
            var cloudTable = new CloudTable(new Uri(SasUrl));

            var productLogEntity = new ProductLogEntity
            {
                PartitionKey   = operationType.ToString(),
                BlobPath       = blobPath,
                ProcessingType = type.ToString(),
                Result         = result.ToString()
            };

            TableOperation insertOperation = TableOperation.Insert(productLogEntity);

            cloudTable.Execute(insertOperation);
        }
Esempio n. 28
0
        /// <summary>
        /// Extract the message from stego object
        /// </summary>
        /// <param name="key">Key used to extract information</param>
        /// <returns>Message that have been extracted from stego object</returns>
        public override Message Extract(string key)
        {
            this._processing = ProcessingType.Extract;
            this._key        = key;
            try
            {
                this.BuildGraph(string.Empty);
                this.Run();
            }
            catch (Exception)
            {
                this._processing = ProcessingType.Done;
                throw;
            }

            return(this.ExtractedMessage);
        }
Esempio n. 29
0
        private void bwAsync_WorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            mProgress.DoClose();
            ProcessingType type = (ProcessingType)e.Result;

            switch (type)
            {
            case ProcessingType.SaveData:
            {
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            }
            break;

            default:
                break;
            }
        }
Esempio n. 30
0
        private void bwAsync_WorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            DataProgress.Visible = DataProgress.IsRunning = false;
            mProgress.DoClose();
            ProcessingType type = (ProcessingType)e.Result;

            switch (type)
            {
            case ProcessingType.LoadData:
            {
                UtilityListView.ListViewRefresh(mListViewData, mListDevice);
            }
            break;

            default:
                break;
            }
        }
Esempio n. 31
0
        private void bwAsync_Worker(object sender, DoWorkEventArgs e)
        {
            ProcessingType type = (ProcessingType)e.Argument;

            e.Result = type;

            switch (type)
            {
            case ProcessingType.LoadData:
            {
                mListDevice = DevicePresenter.GetDevices();
            }
            break;

            default:
                break;
            }
        }
Esempio n. 32
0
        public async Task <SiteProcessingMethodologyTotal> SaveAsync(ProcessingType processingType, Guid?id, int siteId,
                                                                     int platformCount, int protocolCount, DateTime startDate, DateTime endDate, string savedBy)
        {
            SiteProcessingMethodologyTotal row = null;

            if (id.HasValue)
            {
                row = this.GetById(id.Value);

                if (row == null || row.SiteId != siteId)
                {
                    throw new Exception("Cannot find total");
                }

                row.ProcessingTypeId = processingType.Id;
                row.PlatformCount    = platformCount;
                row.ProtocolCount    = protocolCount;
                row.StartDate        = startDate;
                row.EndDate          = endDate;
                row.UpdatedBy        = savedBy;
                row.UpdatedDate      = DateTime.Now;

                await base.SaveAsync(row);
            }
            else
            {
                row = new SiteProcessingMethodologyTotal
                {
                    Id               = Guid.NewGuid(),
                    SiteId           = siteId,
                    ProcessingTypeId = processingType.Id,
                    ProtocolCount    = protocolCount,
                    PlatformCount    = platformCount,
                    StartDate        = startDate,
                    EndDate          = endDate,
                    CreatedDate      = DateTime.Now,
                    CreatedBy        = savedBy
                };

                await base.Repository.AddAsync(row);
            }

            return(row);
        }
Esempio n. 33
0
		public override bool ProcessWordByWord(OfficeDocumentProcessor aWordProcessor, ProcessingType eType)
		{
			Pub.Stories aStories = Document.Stories;
			int nStoryId = 1;
			if (aWordProcessor.AreLeftOvers)
			{
				DialogResult res = MessageBox.Show("Click 'Yes' to restart where you left off, 'No' to start over at the top, and 'Cancel' to quit", Connect.cstrCaption, MessageBoxButtons.YesNoCancel);
				if (res == DialogResult.No)
					aWordProcessor.LeftOvers = null;
				else if (res == DialogResult.Cancel)
					return true;
				else
				{
					System.Diagnostics.Debug.Assert(res == DialogResult.Yes);
					PubRange rngPub = (PubRange)aWordProcessor.LeftOvers;
					nStoryId = rngPub.StoryID;
				}
			}

			for (; nStoryId <= aStories.Count; nStoryId++)
			{
				Pub.Story aStory = aStories[nStoryId];

				bool bResult = ProcessStory(aWordProcessor, aStory);

				if (aWordProcessor.AreLeftOvers)
				{
					PubRange rngPub = (PubRange)aWordProcessor.LeftOvers;
					rngPub.StoryID = nStoryId;  // remember which story we were doing when the user cancelled
				}

				if (!bResult)
					return false;

				aWordProcessor.ReplaceAll = false;  // stop after each story
			}

			return true;
		}
Esempio n. 34
0
        internal void PrepareForCancelling()
        {
            m_bu_Dirty = m_Dirty;
            m_bu_RequiresFullReprocessing = m_RequiresFullReprocessing;
            m_bu_ProcessingType = m_ProcessingType;
            m_bu_Binning = m_Binning;
            m_bu_Normalisation = m_Normalisation;
            m_bu_Filter = m_Filter;
            mbu__NormMethod = m_NormMethod;
            bu_SelectedFrameNo = SelectedFrameNo;

            for (int i = 0; i < 4; i++)
                m_bu_ReProcessApertures[i] = m_ReProcessApertures[i];

            for (int i = 0; i < 4; i++)
                m_bu_ReProcessFitAreas[i] = m_ReProcessFitAreas[i];

            for (int i = 0; i < 4; i++)
                m_bu_ObjectTitles[i] = m_ObjectTitles[i];

            m_bu_ChartTitleLines = m_ChartTitleLines;
        }
Esempio n. 35
0
		public WordDocument(Word.Document doc, ProcessingType eType)
			: base(doc, eType)
		{
		}
Esempio n. 36
0
		public OfficeTextDocument(object doc, ProcessingType eType)
			: base(doc)
		{
			m_eType = eType;
		}
Esempio n. 37
0
    /// <summary>
    /// 執行各項檢查
    /// </summary>
    /// <param name="strStAcceptDate"></param>
    /// <param name="strDisType"></param>
    /// <param name="strPickBatch"></param>
    /// <param name="strUserID"></param>
    /// <param name="strSessionID"></param>
    /// <param name="strProcessingType"></param>
    /// <param name="strErrMsg"></param>
    /// <returns></returns>
    private bool CheckData(string strStAcceptDate, string strDisType, string strPickBatch, string strUserID, string strSessionID, string strDisNo, ProcessingType strProcessingType, out string strErrMsg)
    {
        #region
        bool bResult = false;
        try
        {
            ALOWebService.ALOService BCO = new ALOWebService.ALOService();
            //WebService Timeout 時間60分鐘
            BCO.Timeout = 3600000;//1hr
            //BCO.ConnStr(ConnectionDB);
            //ALOModel.MaintainStAccept BCO = new ALOModel.MaintainStAccept(ConnectionDB);
            string strPrefixed = "";
            strErrMsg = "";
            DataSet Ds = null;
            DataTable dt = null;


            LogEventErrorHandler LEH = new LogEventErrorHandler();
            string strLogFileFolder = HttpContext.Current.Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["LogFolder"]).Replace("ALO\\", "");
            string strLogFileName = string.Format("{0}_{1}.log", "ALO21", DateTime.Now.ToString("yyyyMMdd"));
            string strLogFilePath = string.Format("{0}\\{1}", strLogFileFolder, strLogFileName);


            LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-1】CheckData 輸入之參數門市進貨日:{1}、理貨批次:{2}、配本方式:{3}", strProcessingType.ToString(), strStAcceptDate, strPickBatch, strDisType), false);


            ArrayList ParameterList = new ArrayList();
            ParameterList.Clear();
            ParameterList.Add(strStAcceptDate);//門市進貨日
            ParameterList.Add(strDisType);//配本方式
            ParameterList.Add(strPickBatch);//理貨批次
            ParameterList.Add(strUserID);//執行者
            ParameterList.Add(string.Format("{0}_{1}", strSessionID, strUserID));//PageTimeStamp_LoginID

            if (strProcessingType == ProcessingType.PICKDIFF)
            {
                #region PICKDIFF
                strPrefixed = "POP_CheckDiff";

                LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-2】開始呼叫 ALOWebService.ALOService.CheckPickContronlDiff", strProcessingType.ToString()), false);

                Ds = BCO.CheckPickContronlDiff(VDS2GXmlSerializer(ParameterList));

                LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-3】完成呼叫 ALOWebService.ALOService.CheckPickContronlDiff", strProcessingType.ToString()), false);

                #region 拆解回傳後的物件(第一個DataTable為結果,第二個為錯誤訊息)

                if (Ds.Tables.Count > 0)
                {
                    for (int i = 0; i < Ds.Tables.Count; i++)
                    {
                        switch (i)
                        {
                            case 0:
                                dt = Ds.Tables[i];
                                break;
                            case 1:
                                if (Ds.Tables[i].Rows.Count > 0)
                                {
                                    strErrMsg = Ds.Tables[i].Rows[0]["ErrMsg"].ToString();
                                }
                                else
                                {
                                    throw new Exception("查無CheckPickContronlDiff的錯誤回傳訊息!!");
                                }
                                break;
                            default:
                                break;
                        }
                    }
                }
                else
                {
                    throw new Exception("查無CheckPickContronlDiff任何資料表!!");
                }

                #endregion
                #endregion
            }
            else if (strProcessingType == ProcessingType.DISDIFF)
            {
                #region DISDIFF
                strPrefixed = "POP_CheckDiff";

                LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-2】開始呼叫 ALOWebService.ALOService.CheckDisRecordDiff", strProcessingType.ToString()), false);

                Ds = BCO.CheckDisRecordDiff(VDS2GXmlSerializer(ParameterList));

                LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-3】完成呼叫 ALOWebService.ALOService.CheckDisRecordDiff", strProcessingType.ToString()), false);

                #region 拆解回傳後的物件(第一個DataTable為結果,第二個為錯誤訊息)

                if (Ds.Tables.Count > 0)
                {
                    for (int i = 0; i < Ds.Tables.Count; i++)
                    {
                        switch (i)
                        {
                            case 0:
                                dt = Ds.Tables[i];
                                break;
                            case 1:
                                if (Ds.Tables[i].Rows.Count > 0)
                                {
                                    strErrMsg = Ds.Tables[i].Rows[0]["ErrMsg"].ToString();
                                }
                                else
                                {
                                    throw new Exception("查無CheckDisRecordDiff的錯誤回傳訊息!!");
                                }
                                break;
                            default:
                                break;
                        }
                    }
                }
                else
                {
                    throw new Exception("查無CheckDisRecordDiff任何資料表!!");
                }

                #endregion
                #endregion
            }
            else if (strProcessingType == ProcessingType.CHECKTRANS)
            {
                #region CHECKTRANS
                strPrefixed = "POP_CheckError";

                //LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-2A】開始呼叫 ConfirmDisAgain", strProcessingType.ToString()), false);

                //bool bConfirmResult = ConfirmDisAgain(strDisNo, strStAcceptDate, strUserID);

                //LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-2B】完成呼叫 ConfirmDisAgain", strProcessingType.ToString()), false);

                //if (!bConfirmResult)
                //{
                //    throw new Exception("確認失敗,呼叫POP_DisApproveError();");
                //}

                LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-3A】開始呼叫 ALOWebService.ALOService.CheckCanTransToStAccept", strProcessingType.ToString()), false);

                Ds = BCO.CheckCanTransToStAccept(VDS2GXmlSerializer(ParameterList));

                LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-3B】完成呼叫 ALOWebService.ALOService.CheckCanTransToStAccept", strProcessingType.ToString()), false);

                #region 拆解回傳後的物件(第一個DataTable為結果,第二個為錯誤訊息)

                if (Ds.Tables.Count > 0)
                {
                    for (int i = 0; i < Ds.Tables.Count; i++)
                    {
                        switch (i)
                        {
                            case 0:
                                dt = Ds.Tables[i];
                                break;
                            case 1:
                                if (Ds.Tables[i].Rows.Count > 0)
                                {
                                    strErrMsg = Ds.Tables[i].Rows[0]["ErrMsg"].ToString();
                                }
                                else
                                {
                                    throw new Exception("查無CheckCanTransToStAccept的錯誤回傳訊息!!");
                                }
                                break;
                            default:
                                break;
                        }
                    }
                }
                else
                {
                    throw new Exception("查無CheckCanTransToStAccept任何資料表!!");
                }

                #endregion
                #endregion
            }


            if (strErrMsg == "" && (dt == null || dt.Rows.Count <= 0))
            {
                bResult = true;
            }
            else
            {
                bResult = false;

                if (dt != null && dt.Rows.Count > 0)
                {
                    Session[string.Format("{0}_{1}_{2}", strPrefixed, strSessionID, strUserID)] = dt;
                }

                //2010/08/25 added
                if (strErrMsg.IndexOf("不可配送門市") != -1 ||
                    strErrMsg.IndexOf("期別通路未生效或未建") != -1)
                {
                    Session[string.Format("{0}_DISNO_{1}", "POP_DisApproveError", strSessionID)] = (strErrMsg.Split(";".ToCharArray()))[1];
                    Session[string.Format("{0}_OPTYPE_{1}", "POP_DisApproveError", strSessionID)] = "1";
                }
            }

            LEH.WriteEventLog(strLogFilePath, strUserID, strSessionID, string.Format("【{0}.STEP 2-4】拆解回傳後的物件,結果:{1}", strProcessingType.ToString(), bResult), false);

        }
        catch (Exception ex)
        {
            throw ex;
        }
        return bResult;
        #endregion
    }
Esempio n. 38
0
		public abstract bool ProcessWordByWord(OfficeDocumentProcessor aWordProcessor, ProcessingType eType);
Esempio n. 39
0
		public PubDocument(Pub.Document doc, ProcessingType eType)
			: base(doc, eType)
		{
		}