예제 #1
0
파일: AEvent.cs 프로젝트: ufjl0683/Center
        /// <summary>
        /// �����p���D�n��k�]������^
        /// </summary>
        /// <param name="sender">�b�۰ʩM��ʽs���Ȧs��Hashtable</param>
        public int getExecution(object sender)
        {
            //System.Collections.Generic.List<string> runThread = (System.Collections.Generic.List<string>)sender;
            ExecutionObj exObj = new ExecutionObj();

            exObj.RspID = ht["INC_ID"].ToString();
            exObj.EventID = ht["EVENTID"].ToString();
            AEvent myEvent = factory();
            if (myEvent == null) return -1;
            myEvent.produceExecution(exObj);
            lock (exObj)
            {
                EasyClient easy = new EasyClient();
                easy.saveExecution(ht["INC_ID"].ToString(), Convert.ToInt32(ht["EVENTID"]), exObj, false);
                //saveExecution(exObj);
            }
            return Convert.ToInt32(exObj.EventID);
            //if (Execution.getBuilder() != null)
            //{
            //    switch (Convert.ToInt32(ht["INC_LOGIN_MODE"].ToString()))
            //    {
            //        case 1:
            //            Execution.getBuilder().reportEvent(LoginMode.Auto, exObj.EventID);
            //            break;
            //        case 2:
            //            Execution.getBuilder().reportEvent(LoginMode.Half, exObj.RspID);
            //            break;
            //        default:
            //            Execution.getBuilder().reportEvent(LoginMode.Manual, exObj.RspID);
            //            break;
            //    }
            //}
            //runThread.Remove(ht["INC_ID"].ToString());
        }