private void GetTupleMasters() { var queryListWs = SelectFormatter.Get("name", "workshops"); var queryListSec = SelectFormatter.Get("name", "sectors"); Controller.Run <MastersChoosePresenter, string, string>(queryListWs, queryListSec); }
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); }
private void ChooseSquad() { var queryListWs = SelectFormatter.Get("name", "workshops"); var queryListSec = SelectFormatter.Get("name", "sectors"); Controller.Run <TeamChoosePresenter, string, string>(queryListWs, queryListSec); }
private void ChooseProdTuple() { var queryListWs = SelectFormatter.Get("name", "workshops"); var queryListSec = SelectFormatter.Get("name", "sectors"); Controller.Run <ProductionChoosePresenter, string, string>(queryListWs, queryListSec); }
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); }
public static string GetProductsNames() => SelectFormatter.Union(new List <string> { "name" }, new List <string> { "rockets" , "gliders" , "hang_gliders" , "helicopters" , "planes" , "other_prods" });
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])); }
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")); }
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); }