示例#1
0
 private void ChangeItemEnterStock(Enter enter)
 {
     foreach (var enterItem in enter.EnterItem)
     {
         ItemStock lastest   = db.ItemStock.Where(s => s.ItemId == enterItem.ItemId && s.StoreId == enterItem.StoreId).OrderByDescending(s => s.DateEnter).FirstOrDefault();
         ItemStock itemStock = new ItemStock();
         itemStock.StoreId     = enterItem.StoreId;
         itemStock.StoreName   = enterItem.StoreName;
         itemStock.ItemId      = enterItem.ItemId;
         itemStock.ItemName    = enterItem.ItemName;
         itemStock.InitCount   = (lastest == null ? 0 : lastest.RealCount);
         itemStock.InitPrice   = 0;
         itemStock.InitAmount  = (lastest == null ? 0 : lastest.RealAmount);
         itemStock.EnterType   = enter.EnterType;
         itemStock.DateEnter   = DateTime.Now;
         itemStock.EnterCount  = enterItem.QuantityReal;
         itemStock.EnterPrice  = enterItem.Price;
         itemStock.EnterAmount = enterItem.Price * enterItem.QuantityReal;
         itemStock.ExitType    = "";
         itemStock.ExitCount   = 0;
         itemStock.ExitPrice   = 0;
         itemStock.ExitAmount  = 0;
         itemStock.DateExit    = null;
         itemStock.RealCount   = itemStock.InitCount + itemStock.EnterCount - itemStock.ExitCount;
         itemStock.RealAmount  = itemStock.InitAmount + itemStock.EnterAmount - itemStock.ExitAmount;
         itemStock.TableName   = "EnterItem";
         string guid = Guid.NewGuid().ToString();
         enterItem.Guid       = guid;
         itemStock.RecordGuid = guid;
         db.ItemStock.InsertOnSubmit(itemStock);
     }
 }
示例#2
0
 public StressedState(Enter S, Execute U, Exit E)
 {
     _Name  = "Stressed";
     Start  = S;
     Update = U;
     End    = E;
 }
示例#3
0
        private void RegistEvent()
        {
            inputHandler.Click += data => { if (Enable)
                                            {
                                                Click?.Invoke(this, data);
                                            }
            };

            inputHandler.Enter += data => { if (Enable)
                                            {
                                                Enter?.Invoke(this, data);
                                            }
            };
            inputHandler.Exit += data => { if (Enable)
                                           {
                                               Exit?.Invoke(this, data);
                                           }
            };

            inputHandler.Down += data => { if (Enable)
                                           {
                                               Down?.Invoke(this, data);
                                           }
            };
            inputHandler.Up += data => { if (Enable)
                                         {
                                             Up?.Invoke(this, data);
                                         }
            };
        }
示例#4
0
文件: ready.cs 项目: CD-mon/QAZE-main
    // Update is called once per frame
    public void setLine(int i)
    {
        switch (i)
        {
        case 0: {
            readyAni.SetTrigger("on");
            Qs.SetActive(true);
            Enter.SetActive(true);
            EQ.SetActive(true);
            on[8] = false;
        } break;

        case 1: {
            readyAni.SetTrigger("on");
            As.SetActive(true);
            Enter.SetActive(true);
            EA.SetActive(true);
            on[8] = false;
        } break;

        case 2: {
            readyAni.SetTrigger("on");
            Zs.SetActive(true);
            Enter.SetActive(true);
            EZ.SetActive(true);
            on[8] = false;
        } break;
        }
    }
示例#5
0
        protected override void PerformAs(IPerformer actor)
        {
            if (spec.Title != null)
            {
                actor.Perform(Clear.TheContentsOf(EditSprint.SprintName));
                actor.Perform(Enter.TheText(spec.Title).Into(EditSprint.SprintName));
            }

            if (spec.Description != null)
            {
                actor.Perform(Clear.TheContentsOf(EditSprint.Description));
                actor.Perform(Enter.TheText(spec.Description).Into(EditSprint.Description));
            }

            if (spec.StartDate.HasValue)
            {
                actor.Perform(Enter.TheDate(spec.StartDate.Value).Into(EditSprint.StartDate));
            }

            if (spec.EndDate.HasValue)
            {
                actor.Perform(Enter.TheDate(spec.EndDate.Value).Into(EditSprint.EndDate));
            }

            actor.Perform(Navigate.ToAnotherPageByClicking(EditSprint.SubmitButton));
        }
示例#6
0
        void ExButtonMouseEnter(object sender, MouseEventArgs e)
        {
            if (!RouteLinkClickEvent)
            {
                if (!UserSettings.CurrentSettings.LearnLinkEnabled)
                {
                    if (!Microsoft.Windows.Shell.SystemParameters2.Current.IsGlassEnabled | !UserSettings.CurrentSettings.UseAeroScheme)
                    {
                        return;
                    }

                    Entertype2.Begin();
                    return;
                }
            }


            if (UserSettings.CurrentSettings.UseAeroScheme && Microsoft.Windows.Shell.SystemParameters2.Current.IsGlassEnabled)
            {
                Enter.Begin();
            }
            else
            {
                NoAeroEnter.Begin();
            }
        }
示例#7
0
 protected override void PerformAs(IPerformer actor)
 {
     actor.Perform(Enter.TheText(username).Into(HeaderLoginLogoutWidget.OnAnyPage.UsernameField));
     actor.Perform(Enter.TheText(password).Into(HeaderLoginLogoutWidget.OnAnyPage.PasswordField));
     actor.Perform(Navigate.ToAnotherPageByClicking(HeaderLoginLogoutWidget.OnAnyPage.LoginButton));
     actor.Perform(Wait.Until(LoginPage.Heading).IsVisible());
 }
 public AliveState(Enter S, Execute U, Exit E)
 {
     _Name  = "Alive";
     Start  = S;
     Update = U;
     End    = E;
 }
示例#9
0
    public override void OnEnter(TileController tc)
    {
        Debug.Log("OnEnter");
        if (tc != null)
        {
            if (tc.charBasicController != null)
            {
                tc.charBasicController.isMoving       = true;
                tc.charBasicController._axisInputMov  = false;
                tc.charBasicController._AestrellaMov  = true;
                tc.charAnimationController.IsAnimated = true;
            }
            else
            {
                Debug.Log("CharBasicController = null");
            }
        }
        else
        {
            Debug.Log("TC = null");
        }

        if (enter == null)
        {
            return;
        }

        enter();
        enter = null;
    }
示例#10
0
 public NetInfoPointSource(Enter enter, DriveLane leftLane, DriveLane rightLane, MarkupPoint.LocationType location)
 {
     Enter     = enter;
     LeftLane  = leftLane;
     RightLane = rightLane;
     Location  = location;
 }
示例#11
0
 public void PerformAs(User user)
 {
     user.AttemptsTo(Enter.TheText(user.dmiuser.username).Into(usernameTextBox),
                     Enter.TheText(newPassword).Into(passwordTextBox),
                     Enter.TheText(newPassword).Into(confirmPasswordTextBox),
                     Click.On(submitButton));
 }
示例#12
0
 public DriveLane(Enter enter, uint laneId, NetInfo.Lane info)
 {
     Enter     = enter;
     LaneId    = laneId;
     Position  = info.m_position;
     HalfWidth = Mathf.Abs(info.m_width) / 2;
 }
示例#13
0
        protected override void PerformAs(IPerformer actor)
        {
            actor.Perform(OpenTheirBrowserOn.ThePage <CreateNewTicket>());

            if (!String.IsNullOrEmpty(details.Title))
            {
                actor.Perform(Enter.TheText(details.Title).Into(CreateNewTicket.TicketTitle));
            }

            if (!String.IsNullOrEmpty(details.Description))
            {
                actor.Perform(Enter.TheText(details.Description).Into(CreateNewTicket.TicketDescription));
            }

            if (!String.IsNullOrEmpty(details.Labels))
            {
                actor.Perform(EnterTheLabels.Named(details.Labels));
            }

            if (!String.IsNullOrEmpty(details.Sprint))
            {
                actor.Perform(Select.Item(details.Sprint).From(CreateNewTicket.TicketSprint));
            }

            if (!String.IsNullOrEmpty(details.Type))
            {
                actor.Perform(Select.Item(details.Type).From(CreateNewTicket.TicketType));
            }

            actor.Perform(Navigate.ToAnotherPageByClicking(CreateNewTicket.CreateButton));
        }
 public SleepyState(Enter S, Execute U, Exit E)
 {
     _Name  = "Sleepy";
     Start  = S;
     Update = U;
     End    = E;
 }
示例#15
0
 public Action(PreCondition preCond, Enter enter, Execute execute, Exit exit)
 {
     this.preCond = preCond;
     this.enter   = enter;
     this.execute = execute;
     this.exit    = exit;
 }
示例#16
0
        public void CompletePersonalTab()
        {
            Wait.For(this.GetWindow <DealNotebookWindow>(), window =>
            {
                Click.On(window.PersonnelTab.Header);

                Click.On(window.PersonnelTab.ExpenseCodeButton);
                Wait.For(this.GetWindow <DealSelectExpenseCodeWindow>(), dialog =>
                {
                    Click.On(dialog.AllExpenseCodesButton);
                });

                Wait.For(this.GetWindow <CommonSelectCodeWindow>(), dialog =>
                {
                    Enter.TextInto(dialog.SearchByCodeTextBox, "000001");
                    Click.On(dialog.OkButton);
                });

                Click.On(window.PersonnelTab.SaleGroupsButton);
                Wait.For(this.GetWindow <SalesGroupsSelectionListWindow>(), dialog =>
                {
                    Select.By(dialog.AvailableTree, 0);
                    Click.On(dialog.OkButton);
                });
            });
        }
示例#17
0
 public State <TState, TEvent> CreateState(Enter stateConfig, State <TState, TEvent>?parentState)
 => new State <TState, TEvent, TArgument>(
     stateConfig.StateId,
     stateConfig.EnterActionInvoker,
     stateConfig.ExitAction,
     stateConfig.TransitionList,
     parentState);
示例#18
0
        public void AddDealInternalRiskRating(Table riskRatingTable)
        {
            Wait.For(this.GetWindow <DealNotebookWindow>(), window =>
            {
                Click.On(window.RiskOrRegulatoryTab.Header);
                Click.On(window.RiskOrRegulatoryTab.AddButton);

                Wait.For(this.GetWindow <WarningWindow>(), dialog =>
                {
                    Click.On(dialog.YesButton);
                });
            });

            Wait.For(this.GetWindow <DealInternalRiskRatingDetailsWindow>(), window =>
            {
                Select.By(window.RatingComboBox, riskRatingTable.FindValue("Rating"), VirtualKeyShort.ENTER);

                Wait.For(new[] { window.ValueComboBox }, ratings =>
                {
                    Select.By(window.ValueComboBox, riskRatingTable.FindValue("Value"), VirtualKeyShort.ENTER);

                    Enter.TextInto(window.EffectiveDatePicker, riskRatingTable.FindValue("Effective Date"));
                    Enter.TextInto(window.ExpirationDatePicker, riskRatingTable.FindValue("Expiration Date"));
                    Enter.TextInto(window.PercentageTextBox, riskRatingTable.FindValue("Percent"));
                    Click.On(window.OkButton);
                });
            });
        }
示例#19
0
        public void UpdateAddress(Table addressTable)
        {
            var activeCustomerWindow = Container.GetInstance <WindowFactory <ActiveCustomerWindow> >().Context;

            Click.On(activeCustomerWindow.ProfilesTabItem);
            Click.On(activeCustomerWindow.GenaralButton("Addresses"));

            var addressListWindow = Container.GetInstance <WindowFactory <AddressListWindow> >().Context;

            Click.On(addressListWindow.AddButton);

            var updateAddressWindow = Container.GetInstance <WindowFactory <UpdateAddressWindow> >().Context;
            var values = addressTable.GetTableRows().Select(x => x.GetCell("Value")).ToList();

            Enter.TextInto(updateAddressWindow.AddressCode, values[0]);
            Enter.TextInto(updateAddressWindow.Line1, values[1]);
            Enter.TextInto(updateAddressWindow.Line2, values[2]);
            Enter.TextInto(updateAddressWindow.City, values[3]);
            Select.By(updateAddressWindow.Country, values[4]);
            Enter.TextInto(updateAddressWindow.DefaultPhoneNumber, values[5]);
            Enter.TextInto(updateAddressWindow.ZipPostalCode, values[6]);
            Click.On(updateAddressWindow.OkButton);

            Click.On(addressListWindow.GenaralButton("Exit"));
        }
示例#20
0
        public void CreateDeal(string dealName, string dealAlias, string currency)
        {
            Wait.For(this.GetWindow <MainWindow>(), window =>
            {
                window.Maximize();

                Click.On(window.MenuButtonPane.Actions);
                DoubleClick.On(window.MenuButtonTreePane.FindTreeItem("Deal"));
            });

            Wait.For(this.GetWindow <DealSelectWindow>(), window =>
            {
                Click.On(window.NewRadioButton);
                Enter.TextInto(window.NameTextBox, StringHelpers.GenerateNameWithSuffix(dealName));
                Enter.TextInto(window.AliasTextBox, StringHelpers.GenerateNameWithSuffix(dealAlias));
                Select.By(window.CurrencyComboBox, currency);
                Select.By(window.DepartmentComboBox, 0);
                Click.On(window.OkButton);

                Wait.For(this.GetWindow <WarningWindow>(), dialog =>
                {
                    Click.On(dialog.YesButton);
                });
            }, WaitToFinish.YES);
        }
示例#21
0
 public static IAction <Unit> AddToDoItem(string title)
 {
     return(new DefaultCompositeAction(
                $"Add item '{title}'",
                Enter.TheValue(title).Into(NewToDoItemInput),
                Hit.Enter().Into(NewToDoItemInput)));
 }
示例#22
0
        public void TypesOrPurposes(Table typesTable)
        {
            Wait.For(this.GetWindow <FacilityWindow>(), window =>
            {
                Click.On(window.TypesOrPurposesTab.Header);
                Click.On(window.TypesOrPurposesTab.AddButton);

                Wait.For(this.GetWindow <WarningWindow>(), dialog =>
                {
                    Click.On(dialog.YesButton);
                });

                Wait.For(this.GetWindow <FacilityRiskTypeDetailsWindow>(), dialog =>
                {
                    Select.By(dialog.RiskType, typesTable.FindValue("Risk Type"), VirtualKeyShort.ENTER);
                    Enter.TextInto(dialog.Limit, typesTable.FindValue("Limit"));
                    Click.On(dialog.OkButton);
                });

                Click.On(window.TypesOrPurposesTab.LoanPurposeTypes);
            });

            Wait.For(this.GetWindow <FacilityLoanPurposeSelectWindow>(), window =>
            {
                Select.By(window.AvailableList, 2);
                Click.On(window.OkButton);
            });
        }
示例#23
0
 private void Auth_name_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         Enter.PerformClick();
     }
 }
示例#24
0
 protected override void PerformAs(IPerformer actor)
 {
     actor.Perform(Clear.TheContentsOf(TicketDetail.AddCommentBody));
     actor.Perform(Enter.TheText(commentText).Into(TicketDetail.AddCommentBody));
     actor.Perform(Navigate.ToAnotherPageByClicking(TicketDetail.AddCommentSubmitButton));
     actor.Perform(Wait.Until(TicketDetail.AddCommentFeedbackMessage).IsVisible());
 }
示例#25
0
        private void AddEnter(string userId, int articleId)
        {
            Enter temp = new Enter(articleId, userId);

            db.Enters.Add(temp);
            db.SaveChanges();
        }
示例#26
0
 public static void DMIWithInvalidPassword(IWebDriver driver)
 {
     Enter.Into(driver, DMILoginPage.UsernameField, "qa9");
     Enter.Into(driver, DMILoginPage.PasswordField, "Password123.");
     Click.Button(driver, DMILoginPage.LoginButton);
     WaitFor.Element(driver, DMILoginPage.UsernameField);
 }
 public HungryState(Enter S, Execute U, Exit E)
 {
     _Name  = "Hungry";
     Start  = S;
     Update = U;
     End    = E;
 }
示例#28
0
 public static void DMI(IWebDriver driver)
 {
     Enter.Into(driver, DMILoginPage.UsernameField, "qa1");
     Enter.Into(driver, DMILoginPage.PasswordField, "Password123.");
     Click.Button(driver, DMILoginPage.LoginButton);
     WaitFor.Element(driver, DMIDashboardPage.Dashboard);
 }
示例#29
0
        public void TestEnter()
        {
            //arrange
            string expected = "enter a room where each player from D3340 have a tech group try to evolve more and more powerful taser gun and other elctrical weapons for them. by the door where you standing is a table where several coffee machines stands with a lot of cups as well to keep them awake. each group has it own section which is hidden from the other groups so they cant see what they do. there is a test target as well where you can test their weapon and measure how powerful their weapons and accuracy. "
                              + "\nYou see 1 doors labeled 'C3020'.\n";

            Room enteredRoom = new Room {
                Id = 10, Name = "D3350"
            };

            ApplicationUser user = new ApplicationUser {
                FirstName = "Tord", Room = enteredRoom
            };

            Mock <IRepository> repository = new Mock <IRepository>();

            repository.Setup(x => x.GetUser("0e7d05eb-7b16-4062-8a53-d287a24f5743")).Returns(user);

            var enter = new Enter();

            //Act
            // string actual = enter.RunCommand("D3350", "0e7d05eb-7b16-4062-8a53-d287a24f5743");
            string actual = "enter a room where each player from D3340 have a tech group try to evolve more and more powerful taser gun and other elctrical weapons for them. by the door where you standing is a table where several coffee machines stands with a lot of cups as well to keep them awake. each group has it own section which is hidden from the other groups so they cant see what they do. there is a test target as well where you can test their weapon and measure how powerful their weapons and accuracy. "
                            + "\nYou see 1 doors labeled 'C3020'.\n";

            //Assess
            Assert.AreEqual(expected, actual);
        }
示例#30
0
 private void ChangeItemEnterBatch(Enter enter)
 {
     foreach (var enterItem in enter.EnterItem)
     {
         StockBatch lastest    = db.StockBatch.Where(s => s.ItemId == enterItem.ItemId && s.StoreId == enterItem.StoreId && s.DateProduct == enterItem.DateProduct).OrderByDescending(s => s.DateEnter).FirstOrDefault();
         StockBatch stockBatch = new StockBatch();
         stockBatch.StoreId     = enterItem.StoreId;
         stockBatch.StoreName   = enterItem.StoreName;
         stockBatch.ItemId      = enterItem.ItemId;
         stockBatch.ItemName    = enterItem.ItemName;
         stockBatch.BatchNo     = (lastest == null ? DateTime.Now.ToString("yyyyMMddhhmmssffff") : lastest.BatchNo);
         stockBatch.DateProduct = enterItem.DateProduct;
         Item item = db.Item.Where(i => i.Id == enterItem.ItemId).FirstOrDefault();
         stockBatch.Guarantee  = item.Guarantee;
         stockBatch.InitCount  = (lastest == null ? 0 : lastest.RealCount);
         stockBatch.EnterType  = enter.EnterType;
         stockBatch.DateEnter  = DateTime.Now;
         stockBatch.EnterCount = enterItem.QuantityReal;
         stockBatch.ExitType   = "";
         stockBatch.ExitCount  = 0;
         stockBatch.DateExit   = null;
         stockBatch.RealCount  = stockBatch.InitCount + stockBatch.EnterCount - stockBatch.ExitCount;
         stockBatch.TableName  = "EnterItem";
         stockBatch.RecordGuid = enterItem.Guid;
         db.StockBatch.InsertOnSubmit(stockBatch);
     }
 }