コード例 #1
0
        private void GetTupleMasters()
        {
            var queryListWs  = SelectFormatter.Get("name", "workshops");
            var queryListSec = SelectFormatter.Get("name", "sectors");

            Controller.Run <MastersChoosePresenter, string, string>(queryListWs, queryListSec);
        }
コード例 #2
0
        private void GetToolsByProducts()
        {
            var query = Query.GetCategoryQuery(View.GetSelectedCategory());

            if (query == "one product")
            {
                query = Query.GetProdIdByProductName(View.GetChoosenProd());
            }
            else
            {
                query = SelectFormatter.Get("prod_id", "(" + query + ")");
            }
            var conditions = new List <string>();

            conditions.Add("time_end<=to_date('" + View.GetTimeEnd() + "','dd.mm.yyyy')");
            conditions.Add("time_begin>=to_date('" + View.GetTimeBegin() + "','dd.mm.yyyy')");
            conditions.Add(QueryFormatter.In("prod_id", query));

            query = QueryFormatter.SelectFormatter.Get("prod_id"
                                                       , "products_exps"
                                                       , conditions);

            query = Query.GetToolsByProdIdLab(query, View.GetChoosenLab());
            Controller.Run <DirectorScientistsPresenter, string>(query);
        }
コード例 #3
0
        private void ChooseSquad()
        {
            var queryListWs  = SelectFormatter.Get("name", "workshops");
            var queryListSec = SelectFormatter.Get("name", "sectors");

            Controller.Run <TeamChoosePresenter, string, string>(queryListWs, queryListSec);
        }
コード例 #4
0
        private void ChooseProdTuple()
        {
            var queryListWs  = SelectFormatter.Get("name", "workshops");
            var queryListSec = SelectFormatter.Get("name", "sectors");

            Controller.Run <ProductionChoosePresenter, string, string>(queryListWs, queryListSec);
        }
コード例 #5
0
        private void GetProductsByLaboratory()
        {
            var query = Query.GetProdIdByLaboratory(View.GetChoosenItem(), View.GetTimeBegin()
                                                    , View.GetTimeEnd());
            var prodQuery = Query.GetCategoryQuery(View.GetSelectedCategory());

            query = SelectFormatter.Get("*", "(" + prodQuery + ")", query, "prod_id");
            Controller.Run <DirectorScientistsPresenter, string>(query);
        }
コード例 #6
0
ファイル: Query.cs プロジェクト: mrsadman99/bd_client
 public static string GetProductsNames() =>
 SelectFormatter.Union(new List <string> {
     "name"
 }, new List <string> {
     "rockets"
     , "gliders"
     , "hang_gliders"
     , "helicopters"
     , "planes"
     , "other_prods"
 });
コード例 #7
0
        private RoleManager.RoleType GetInformation()
        {
            var conditions = new List <string> {
                "login='******'"
                , "pas='******'"
            };
            var query = SelectFormatter.Get("role", "accounts", conditions);
            var ls    = Formatter
                        .GetStringData(Model.GetData(query));

            return(RoleManager.GetType(ls[0]));
        }
コード例 #8
0
ファイル: Query.cs プロジェクト: mrsadman99/bd_client
        public static string GetProductsNames(string id)
        {
            var query = SelectFormatter.Union(new List <string> {
                "name", "prod_id"
            }, new List <string> {
                "rockets"
                , "gliders"
                , "hang_gliders"
                , "helicopters"
                , "planes"
                , "other_prods"
            });

            return(SelectFormatter.Get("name", "(" + query + ")", id, "prod_id"));
        }
コード例 #9
0
        public void Format(string formatterArgs, string gender, string expectedBlock)
        {
            var subject = new SelectFormatter();
            var messageFormatterMock = new Mock <IMessageFormatter>();

            messageFormatterMock.Setup(x => x.FormatMessage(It.IsAny <string>(), It.IsAny <Dictionary <string, object?> >()))
            .Returns((string input, Dictionary <string, object> a) => input);
            var req = new FormatterRequest(
                new Literal(1, 1, 1, 1, new StringBuilder()),
                "gender",
                "select",
                formatterArgs);
            var args = new Dictionary <string, object?> {
                { "gender", gender }
            };
            var result = subject.Format("en", req, args, gender, messageFormatterMock.Object);

            Assert.Equal(expectedBlock, result);
        }