コード例 #1
0
 public override void Call <ActiveRecord>(DataTable <ActiveRecord> table, CallQuery <ActiveRecord> query, Action executor)
 {
     enqueueWork((w) =>
     {
         w.Call(table, query, executor);
     });
 }
コード例 #2
0
ファイル: LightDataDriver.cs プロジェクト: m9ra/ServeRick
        public override void Call <ActiveRecord>(DataTable <ActiveRecord> table, CallQuery <ActiveRecord> query, Action executor)
        {
            var callHandler = _storedCalls[query.CallName] as LightDataDriveCall <ActiveRecord>;

            callHandler(new CallTableApi <ActiveRecord>(table), query.Arguments.ToDictionary(p => p.Key, p => p.Value));
            executor();
        }
コード例 #3
0
ファイル: MainViewModel.cs プロジェクト: hawoond/Platform
        /// <summary>
        /// 초기화 함수
        /// </summary>
        public void Init()
        {
            IsLogin     = false;
            ContentList = new MTObservableCollection <UdtContentItem>();
            callQuery   = new CallQuery();

            //ContentList.Add(test);
            IsSidebarOpen = null;

            SearchContent("1", "", "");

            FavList    = new MTObservableCollection <UdtMyListItem>();
            PrchList   = new MTObservableCollection <UdtMyListItem>();
            ReviewList = new MTObservableCollection <UdtMyListItem>();

            //패스워드 저장되어있으면 자동로그인함
            if (!string.IsNullOrEmpty(Properties.Settings.Default.PW))
            {
                AutoLogin();
            }
            else
            {
                LoginText = Properties.Resources.LOGIN_TEXT;
                UserName  = Properties.Resources.LOGIN_TEXT;
            }

            InitMyList();
            InitPrchList();
            InitReviewList();
        }
コード例 #4
0
            Unit ICodeConsumer <Local, Parameter, Method, Field, Type, Node, Unit> .Accept <Label>(ICodeProvider <Label, Local, Parameter, Method, Field, Type> codeProvider, Label entryPoint, Node current)
            {
                CallQuery <Label> query = new CallQuery <Label>(codeProvider, parent, current);

                query.TraceSequentially(entryPoint);
                return(Unit.Value);
            }
コード例 #5
0
ファイル: BackgroundTask.cs プロジェクト: m9ra/ServeRick
        protected void Execute <T>(CallQuery <T> query, Action action = null)
            where T : DataRecord
        {
            var item = query.CreateWork(action);

            enqueue(item);
        }
コード例 #6
0
ファイル: CallGraph.cs プロジェクト: zhuyue1314/CodeContracts
        public Unit Accept <Label, Handler>(
            IMethodCodeProvider <Label, Local, Parameter, Method, Field, Type, Handler> codeProvider,
            Label entryPoint, Method method, Unit data)
        {
            CallQuery <Label, Handler> query = new CallQuery <Label, Handler>(codeProvider, this, method);

            query.TraceSequentially(entryPoint);
            return(Unit.Value);
        }
コード例 #7
0
 /// <summary>
 /// 생성자
 /// </summary>
 public ContentsViewModel()
 {
     // 서비스 통신 객체 null 체크
     if (null == callQuery)
     {
         // 서비스 통신 객체 생성
         callQuery = new CallQuery();
     }
     Init();
 }
コード例 #8
0
        public Unit Accept <Label, Handler>(IMethodCodeProvider <Label, Local, Parameter, Method, Field, Type, Handler> codeProvider, Label entryPoint, Method method, Unit data)
        {
            CallQuery <Label> query = new CallQuery <Label>(codeProvider, this, Node.For(method));

            query.TraceSequentially(entryPoint);

            this.fieldsDB.NotifyPossiblyModifiedFields(method, query.StoredFields);

            return(Unit.Value);
        }
コード例 #9
0
ファイル: ucMyListItem.xaml.cs プロジェクト: hawoond/Platform
        private void Label_MouseUp(object sender, MouseButtonEventArgs e)
        {
            // 데이터 삭제
            CallQuery callQuery = new CallQuery();

            DataSet dsResult = new DataSet();

            dsResult = callQuery.D_MA_USR_FAV_SIN(MainViewModel.LoginUser.USER_NO, ((UdtMyListItem)this.DataContext).ContentID);

            // 구매내역 갱신
            MainViewModel.Instance.InitMyList();
        }
コード例 #10
0
ファイル: BackgroundTask.cs プロジェクト: m9ra/ServeRick
        protected void BlockingExecute <T>(CallQuery <T> query)
            where T : DataRecord
        {
            requireDbLockAccess();

            lock (_L_databaseSync)
            {
                Execute(query, unlockDbAction);
                //wait until query is finished
                Monitor.Wait(_L_databaseSync);
            }
        }
コード例 #11
0
        public override void Call <ActiveRecord>(DataTable <ActiveRecord> table, CallQuery <ActiveRecord> query, Action executor)
        {
            var queryCmd = getQuery();

            queryCmd.Append(query.CallName);
            queryCmd.MarkProcedure();

            addCallArguments(queryCmd, query.Arguments);

            queryCmd.ExecuteNonQuery();

            executor();
        }
コード例 #12
0
ファイル: MainViewModel.cs プロジェクト: hawoond/Platform
        /// <summary>
        /// 자동로그인!!!!
        /// </summary>
        private void AutoLogin()
        {
            CallQuery callQuery = new CallQuery();
            DataSet   dsResult  = callQuery.S_CO_USR_LGN_SIN(Properties.Settings.Default.ID, Properties.Settings.Default.PW);

            DataRow LoginData = dsResult.Tables[0].Rows[0];

            if (LoginData["SUCCESS_YN"].Equals("Y"))
            {
                MainViewModel.LoginUser = (S_CO_USR_LGN_SIN)StaticUtils.DataRowToClass(new S_CO_USR_LGN_SIN(), LoginData);
                LoginText  = Properties.Resources.LOGOUT_TEXT;
                IsLogin    = true;
                UserName   = LoginUser.USER_NM;
                UserNumber = LoginUser.USER_NO;
            }
            else
            {
                MessageBox.Show("로그인 정보 변경됐당 다시 로그인해랑");
            }
        }
コード例 #13
0
ファイル: LoginViewModel.cs プロジェクト: hawoond/Platform
        private void Login(object param)
        {
            CallQuery callQuery = new CallQuery();
            DataSet   dsResult  = callQuery.S_CO_USR_LGN_SIN(LoginID, Password);

            DataRow LoginData = dsResult.Tables[0].Rows[0];

            if (LoginData["SUCCESS_YN"].Equals("Y"))
            {
                MainViewModel.LoginUser = (S_CO_USR_LGN_SIN)StaticUtils.DataRowToClass(new S_CO_USR_LGN_SIN(), LoginData);

                if (bAutoLogin)
                {
                    Properties.Settings.Default.ID = LoginID;
                    Properties.Settings.Default.PW = Password;
                }
                else
                {
                    Properties.Settings.Default.ID = "";
                    Properties.Settings.Default.PW = "";
                }

                if (bAutoIDSave)
                {
                    Properties.Settings.Default.ID = LoginID;
                }
                else
                {
                    Properties.Settings.Default.ID = "";
                }

                Properties.Settings.Default.Save();
                StaticUtils.loginWindow.DialogResult = true;
                StaticUtils.CloseLoginWindow();
            }
            else
            {
                MessageBox.Show("로그인 안됐당");
            }
        }
コード例 #14
0
 public IEnumerable <Net.Api.Call> List(CallQuery query = null, CancellationToken?cancellationToken = null)
 {
     throw new System.NotImplementedException();
 }