private void setField() { fieldAliases.Clear(); IFieldConsumer c = this; foreach (string fn in extAliases.Keys) { Dictionary <int, string> an = extAliases[fn]; foreach (IPhysicalField field in fields) { string na = this.GetRelativeName(field as IAssociatedObject); if (na.Equals(fn)) { Dictionary <int, Transformer> d = new Dictionary <int, Transformer>(); fieldAliases[field] = d; foreach (int num in an.Keys) { AliasName aln = this.FindAliasName(an[num], true); Transformer tr = new Transformer(); tr.an = aln; tr.tr = FieldTransformer.Create(field.GetType(num), field.GetTransformationType(num)); d[num] = tr; } } } } }
public override void WriteToStream(IndentStream stream) { if (!string.IsNullOrEmpty(JoinType)) { stream.Write($"{JoinType.ToUpper()} "); } if (!string.IsNullOrEmpty(OuterType)) { stream.Write($"{OuterType.ToUpper()} "); } stream.Write("JOIN "); SecondTable.WriteToStream(stream); if (AliasName != null) { stream.Write(" "); AliasName.WriteToStream(stream); } if (WithOptions != null && WithOptions.Count > 0) { stream.Write(" WITH("); WithOptions.ToUpper().WriteToStreamWithComma(stream); stream.Write(")"); } if (JoinOnExpr != null) { stream.Write(" ON "); JoinOnExpr.WriteToStream(stream); } }
private void createMeasurements() { foreach (string s in instr) { if (s == null) { return; } } foreach (string s in outstr) { if (s == null) { return; } } for (int i = 0; i < instr.Length; i++) { AliasName a = this.FindAliasName(instr[i], false); aln[i] = a; } for (int i = 0; i < outstr.Length; i++) { measures[i] = this.FindMeasurement(outstr[i], true); } createTransition(); }
public QueryKrokujPracPocitanyInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("PRAC", TablePracVyberAggrInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("pracovnik_id"), SimpleName.Create("logicky_zrusen"), SimpleName.Create("logicky_neuplny"), SimpleName.Create("pocitane_obdobi"), SimpleName.Create("osobni_cislo"), SimpleName.Create("datum_narozeni"), SimpleName.Create("rodne_cislo"), SimpleName.Create("prijmeni"), SimpleName.Create("jmeno"), SimpleName.Create("titul_pred"), SimpleName.Create("titul_za"), AliasName.Create("zar_mesic", "mesic"), SimpleName.Create("vyuct_cast") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UTVAR", TableUtvarInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("uutvar_id"), SimpleName.Create("utvnazev"), SimpleName.Create("vyuctgr"), SimpleName.Create("zeme_cislo"), SimpleName.Create("uzivatel_id") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("PRAC", "UTVAR"). AddColumn("firma_id", "firma_id"). AddColumn("uutvar_id", "uutvar_id")); }
public void DefaultValues() { var sut = new AliasName(); Assert.True(sut.IsUnknown); Assert.False(sut.IsHashed); }
/// <summary> /// Sets aliases /// </summary> protected void SetAliases() { foreach (int key in aliases.Keys) { AliasName an = aliases[key]; an.SetValue(state[key]); } }
private void setSurface() { surfaceAliaes.Clear(); foreach (int n in intAliases.Keys) { string al = intAliases[n]; AliasName an = this.FindAliasName(al, false); surfaceAliaes[n] = an; } }
public QueryVyberPracOpravneniInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("DAN_UTVAR", TableDanInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("pracovnik_id"), SimpleName.Create("mesic"), AliasName.Create("informace", "vyuct_cast") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UTVAR", TableUtvarInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("vyuctgr"), SimpleName.Create("uutvar_id"), AliasName.Create("utvnazev", "nazev_utvar"), AliasName.Create("zeme_cislo", "cislo_zeme"), SimpleName.Create("uzivatel_id"), SimpleName.Create("personal_id"), SimpleName.Create("prohlizet_id"), SimpleName.Create("omezproh_id"), SimpleName.Create("referzp_id") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UPRES", TableUtvarInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( AliasName.Create("uutvar_id", "uupres_id"), AliasName.Create("utvnazev", "nazev_upres"), AliasName.Create("uzivatel_id", "uziv_pres"), AliasName.Create("personal_id", "pers_pres"), AliasName.Create("prohlizet_id", "proh_pres"), AliasName.Create("omezproh_id", "omez_pres"), AliasName.Create("referzp_id", "refz_pres") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UZIVATEL", TableUzivatelInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("uzivjmeno") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("DAN_UTVAR", "UTVAR"). AddColumn("firma_id", "firma_id"). AddColumn("sazba", "uutvar_id"). AddLeftColumn("odkud", "=", "0"). AddLeftColumn("kod", "=", "6100"). AddLeftColumn("cislo", "=", "1")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("DAN_UTVAR", "UPRES"). AddColumn("firma_id", "firma_id"). AddColumn("hodnota", "uutvar_id")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("UTVAR", "UZIVATEL"). AddColumn("firma_id", "firma_id"). AddColumn("uzivatel_id", "uuzivatel_id")); }
/// <summary> /// 判断别名是否存在 /// </summary> /// <param name="Name"></param> /// <returns></returns> private bool AliasNameExist(AliasName aliasName) { StringBuilder strSql = new StringBuilder(); strSql.Append("SELECT * FROM ALIASNAME T "); strSql.Append(" WHERE BOID=@BOID AND APPDOMAIN=@APPDOMAIN "); SqlParameter[] parameters = { new SqlParameter("BOID",SqlDbType.VarChar,36), new SqlParameter("APPDOMAIN",SqlDbType.VarChar,50)}; parameters[0].Value = aliasName.BOID; parameters[1].Value = aliasName.APPDOMAIN; return DBUtility.SqlServerDBHelper.ExecuteQueryText<AliasName>(strSql.ToString(), parameters).Count() >= 1 ? true : false; }
public QuerySocialInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("PRAC", TableZsestSocialInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), AliasName.Create("druh_cinnosti", "max_vymzakl"), AliasName.Create("zap_prijem", "sum_prijem"), AliasName.Create("pojist_org", "pojsum_org"), AliasName.Create("pojistne_zam", "pojsum_zam") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("PPOM", TableZsestSocialInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("uzivatel_id"), SimpleName.Create("kod_data"), SimpleName.Create("pracovnik_id"), SimpleName.Create("cislo_pp"), SimpleName.Create("socsprava_id"), SimpleName.Create("info_org"), SimpleName.Create("uplne_jmeno"), SimpleName.Create("rodne_cislo"), SimpleName.Create("ucast_poj"), SimpleName.Create("ppom_stav"), SimpleName.Create("koef_poj"), SimpleName.Create("druh_cinnosti"), SimpleName.Create("zap_prijem"), SimpleName.Create("pojist_org"), SimpleName.Create("pojistne_zam"), SimpleName.Create("vyl_doby"), SimpleName.Create("absence"), SimpleName.Create("nemoc_dny"), SimpleName.Create("nemoc_kc"), SimpleName.Create("osetrovani_dny"), SimpleName.Create("osetrovani_kc"), SimpleName.Create("materstvi_kc"), SimpleName.Create("materstvi_n"), SimpleName.Create("vyrovnani_n"), SimpleName.Create("vyrovnani_kc"), SimpleName.Create("davka_e_kod"), SimpleName.Create("davka_e_kc"), SimpleName.Create("davka_f_kod"), SimpleName.Create("davka_f_kc") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("PRAC", "PPOM"). AddColumn("firma_id", "firma_id"). AddColumn("uzivatel_id", "uzivatel_id"). AddColumn("kod_data", "kod_data"). AddColumn("pracovnik_id", "pracovnik_id"). AddColumn("socsprava_id", "socsprava_id"). AddLeftColumn("cislo_pp", "=", "0"). AddRightColumn("cislo_pp", "<>", "0")); }
public override void WriteToStream(IndentStream stream) { Variable.WriteToStream(stream); stream.Write("."); NodesExpr.WriteToStream(stream); stream.Write(" AS "); AliasName.WriteToStream(stream); stream.Write("("); ColumnName.WriteToStream(stream); stream.Write(")"); }
/// <summary> /// 判断别名是否存在 /// </summary> /// <param name="Name"></param> /// <returns></returns> private bool AliasNameExist(AliasName aliasName) { StringBuilder strSql = new StringBuilder(); strSql.Append("SELECT * FROM ALIASNAME T "); strSql.Append(" WHERE BOID=:BOID AND APPDOMAIN=:APPDOMAIN "); OracleParameter[] parameters = { new OracleParameter("BOID", OracleDbType.Varchar2, 36), new OracleParameter("APPDOMAIN", OracleDbType.Varchar2, 50) }; parameters[0].Value = aliasName.BOID; parameters[1].Value = aliasName.APPDOMAIN; return(DBUtility.OracleDBHelper.OracleHelper.ExecuteQueryText <AliasName>(strSql.ToString(), parameters).Count() >= 1 ? true : false); }
public QuerySumaDanInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("DAN", TableDanInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("mesic"), SimpleName.Create("odkud"), SimpleName.Create("kod"), AliasName.Create("hodnota", "hodnota", "SUM({0})"), AliasName.Create("pocjed", "pocjed", "SUM({0})"), AliasName.Create("pocdal", "pocdal", "SUM({0})"), AliasName.Create("sazba", "sazba", "SUM({0})") )); AddClause("GROUP BY firma_id, mesic, odkud, kod"); }
public QueryVyberUcetPrPolozkyInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UCPREDP", TableUcetniPredpisyInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), AliasName.Create("ppredpis_id", "predpis_id"), SimpleName.Create("predpis_uckod"), SimpleName.Create("predpis_nazev"), SimpleName.Create("predpis_druh") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UCPOLOZ", TableUcetniPolozkyInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("cislo"), SimpleName.Create("poloz_nazev"), SimpleName.Create("poloz_druh"), SimpleName.Create("poloz_skup"), SimpleName.Create("poloz_synt"), SimpleName.Create("poloz_anal"), SimpleName.Create("poloz_text1"), SimpleName.Create("poloz_inf1"), SimpleName.Create("poloz_delka1"), SimpleName.Create("poloz_fmt1"), SimpleName.Create("poloz_text2"), SimpleName.Create("poloz_inf2"), SimpleName.Create("poloz_delka2"), SimpleName.Create("poloz_fmt2"), SimpleName.Create("poloz_text3"), SimpleName.Create("poloz_inf3"), SimpleName.Create("poloz_delka3"), SimpleName.Create("poloz_fmt3"), SimpleName.Create("poloz_text4"), SimpleName.Create("poloz_inf4"), SimpleName.Create("poloz_delka4"), SimpleName.Create("poloz_fmt4"), SimpleName.Create("poloz_text5"), SimpleName.Create("poloz_inf5"), SimpleName.Create("poloz_delka5"), SimpleName.Create("poloz_fmt5") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("UCPREDP", "UCPOLOZ"). AddColumn("firma_id", "firma_id"). AddColumn("ppredpis_id", "predpis_id")); }
private object[] Calculate(double[] position) { int n = facets.Count; for (int ic = 0; ic < n; ic++) { double[] p = facets[ic]; for (int i = 0; i < position.Length; i++) { AliasName an = al[i]; an.SetValue(position[i] - p[i]); } if (area != null) { area.SetValue(facets.GetArea(ic)); } foreach (int k in parameters.Keys) { parameters[k].SetValue(facets[ic, k]); } if (normal != null) { normal.SetValue(facets.GetNormal(ic)); } foreach (IMeasurements m in measurements) { m.UpdateMeasurements(); } for (int i = 0; i < measures.Length; i++) { object o = measures[i].Parameter(); result[i] = adds[i](result[i], o); } this.FullReset(); /* foreach (IMeasurements m in measurements) * { * isUpdated[m] = false; * }*/ } return(result); }
public QueryCelkVyuctFinInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("VFIN", TableZsestPrehvyuctfinInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("kod_data"), SimpleName.Create("uzivatel_id"), SimpleName.Create("kod"), AliasName.Create("hodnota_numb", "hodnota_numb", "SUM({0})") )); AddFiltr(QueryWhereDefInfo.GetQueryWhereDefInfo("VFIN", TableZsestPrehvyuctfinInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddConstraints( QueryFilterDefInfo.Create("mesic", "<>", "0"), QueryFilterDefInfo.Create("poradi", "=", "0") )); AddClause("GROUP BY firma_id, kod_data, uzivatel_id, kod"); }
public QueryVyberPracZarazeniInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("MDAN_UTVAR", TableDanInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("pracovnik_id"), SimpleName.Create("mesic"), AliasName.Create("sazba", "cislo_utvar"), AliasName.Create("pocjed", "cislo_zdrpoj") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("MDAN_STRCZ", TableDanInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("cislo_zdroj"), SimpleName.Create("cislo_stred"), SimpleName.Create("cislo_cinnost"), SimpleName.Create("cislo_zakazka") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("MUTVAR", TableUtvarInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( AliasName.Create("utvnazev", "nazev_utvar"), AliasName.Create("zeme_cislo", "cislo_zeme") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("MDAN_UTVAR", "MDAN_STRCZ"). AddColumn("firma_id", "firma_id"). AddColumn("pracovnik_id", "pracovnik_id"). AddColumn("mesic", "mesic"). AddRightColumn("odkud", "=", "0"). AddRightColumn("kod", "=", "6100"). AddRightColumn("cislo", "=", "1"). AddLeftColumn("odkud", "=", "0"). AddLeftColumn("kod", "=", "6101"). AddLeftColumn("cislo", "=", "1")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("MDAN_UTVAR", "MUTVAR"). AddColumn("firma_id", "firma_id"). AddColumn("sazba", "uutvar_id")); }
/// <summary> /// Calculates field /// </summary> /// <param name="position">Position</param> /// <returns>Array of components of field</returns> public virtual object[] this[double[] position] { get { for (int i = 0; i < position.Length; i++) { AliasName an = al[i]; an.SetValue(position[i]); } foreach (IMeasurements m in measurements) { m.UpdateMeasurements(); } for (int i = 0; i < measures.Length; i++) { result[i] = measures[i].Parameter(); } this.FullReset(); return(result); } }
public QueryVyplListkySortInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("ZSEST_VYPL_LISTKY", TableZsestVyplListkyInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("uzivatel_id"), SimpleName.Create("pracovnik_id"), SimpleName.Create("vlist_info"), SimpleName.Create("radek"), SimpleName.Create("typ"), SimpleName.Create("radtext"), SimpleName.Create("engtext") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("LISTKYP", TableZsestVyplListkyInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( AliasName.Create("typ", "typ_pr"), AliasName.Create("radtext", "text_pr") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("LISTKYU", TableZsestVyplListkyInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( AliasName.Create("typ", "typ_ut"), AliasName.Create("radtext", "text_ut") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("ZSEST_VYPL_LISTKY", "LISTKYP"). AddColumn("firma_id", "firma_id"). AddColumn("uzivatel_id", "uzivatel_id"). AddColumn("pracovnik_id", "pracovnik_id"). AddRightColumn("typ", "=", "2")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("ZSEST_VYPL_LISTKY", "LISTKYU"). AddColumn("firma_id", "firma_id"). AddColumn("uzivatel_id", "uzivatel_id"). AddColumn("pracovnik_id", "pracovnik_id"). AddRightColumn("typ", "=", "1")); }
public QueryVyberPPomZarazeniInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("MMZDA_STRCZ", TableMzdaInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("pracovnik_id"), SimpleName.Create("cislo_pp"), SimpleName.Create("mesic"), AliasName.Create("cislo_zdroj", "ppomer_zdroj"), AliasName.Create("cislo_stred", "ppomer_stred"), AliasName.Create("cislo_cinnost", "ppomer_cinnost"), AliasName.Create("cislo_zakazka", "ppomer_zakazka") )); AddFiltr(QueryWhereDefInfo.GetQueryWhereDefInfo("MMZDA_STRCZ", TableZsestExtMzdlistInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddConstraints( QueryFilterDefInfo.Create("odkud", "=", "0"), QueryFilterDefInfo.Create("kod", "=", "6000"), QueryFilterDefInfo.Create("cislo", "=", "1") )); }
private void SetAdditionalAliases() { area = null; normal = null; parameters.Clear(); if (areaString.Length > 0) { area = this.FindAliasName(areaString, false); if (area == null) { areaString = ""; } } if (normalString.Length > 0) { normal = this.FindAliasName(normalString, false); if (normal == null) { normalString = ""; } } List <int> del = new List <int>(); foreach (int i in aliases.Keys) { AliasName an = this.FindAliasName(aliases[i], false); if (an == null) { del.Add(i); continue; } parameters[i] = an; } foreach (int i in del) { aliases.Remove(i); } }
public override void WriteToStream(IndentStream stream) { Left.WriteToStream(stream); if (AliasName != null) { stream.Write(" AS "); AliasName.WriteToStream(stream); } if (Options.Count > 0) { stream.Write(" WITH("); Options.ToUpper().WriteToStreamWithComma(stream); stream.Write(")"); } if (JoinList != null && JoinList.Count > 0) { stream.WriteLine(); JoinList.WriteToStream(stream); } }
public QueryVyberReldp09DavkaInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UD", TableUzivReldpDavkaInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), AliasName.Create("ddavka_reldp_id", "davka_reldp_id"), SimpleName.Create("uzivatel_id"), AliasName.Create("vydano_dat", "vydano_dat", "MAX({0})"), AliasName.Create("info_davka", "info_davka", "MAX({0})") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("PP", TablePracReldp09DataPracInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( AliasName.Create("eldp_rok", "eldp_rok", "MAX({0})") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("UD", "PP"). AddColumn("firma_id", "firma_id"). AddColumn("ddavka_reldp_id", "davka_reldp_id"). AddColumn("uzivatel_id", "uzivatel_id")); AddClause("GROUP BY UD.firma_id, UD.ddavka_reldp_id, UD.uzivatel_id"); }
public QueryVyberSestavyInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("SLST", TableSestavyLstInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("kod_lst"), SimpleName.Create("kod_data"), SimpleName.Create("druh"), SimpleName.Create("typ_lst"), SimpleName.Create("trideni"), SimpleName.Create("nazev"), SimpleName.Create("soubor"), SimpleName.Create("skupina"), SimpleName.Create("subjekt_id"), SimpleName.Create("informace") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UDATA", TableSestavyUdataInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("vytvor_vyuc"), SimpleName.Create("vyuct_dat"), SimpleName.Create("mesic_od"), SimpleName.Create("mesic_do"), SimpleName.Create("rok"), SimpleName.Create("vytvor_txt"), SimpleName.Create("vytvor_dat") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("ULST", TableSestavyUlstInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("tisknout"), SimpleName.Create("sestavy_id"), SimpleName.Create("pg_margins"), SimpleName.Create("papir"), SimpleName.Create("tridit"), SimpleName.Create("exp_cesta"), SimpleName.Create("lst_param"), SimpleName.Create("txt_param"), SimpleName.Create("msg_param"), SimpleName.Create("filtr_zobr") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UZ", TableUzivatelInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("uuzivatel_id"), AliasName.Create("sestavy_id", "usestavy_id") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("SLST", "UDATA"). AddColumn("firma_id", "firma_id"). AddColumn("kod_data", "kod_data")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("SLST", "ULST"). AddColumn("firma_id", "firma_id"). AddColumn("kod_lst", "kod_lst"). AddRightColumn("uzivatel_id", "=", "UDATA.uzivatel_id")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("ULST", "UZ"). AddColumn("firma_id", "firma_id"). AddColumn("uzivatel_id", "uuzivatel_id")); }
/// <summary> /// Process /// </summary> private void Process() { IDataConsumer cons = this; if (provider == null) { bmp = null; return; } if (provider.Bitmap == null) { return; } if (colorAliases == null) { return; } if (extColors == null) { return; } Bitmap b = provider.Bitmap; if (b == null) { return; } bmp = new Bitmap(b.Width, b.Height); int right = colorAliases.GetLength(0) - left; int bottom = colorAliases.GetLength(1) - top; for (int i = 0; i < bmp.Width; i++) { int ii = i - left; if ((ii < 0) | (i + right >= bmp.Width)) { continue; } for (int j = 0; j < bmp.Height; j++) { int jj = j - top; if ((jj < 0) | (j + bottom >= bmp.Height)) { continue; } double x = (double)i; double y = (double)j; if (coord[0] != null) { coord[0].SetValue(x); } if (coord[1] != null) { coord[1].SetValue(y); } for (int k = 0; k < extColors.GetLength(0); k++) { int xc = ii + k; for (int l = 0; l < extColors.GetLength(1); l++) { int yc = jj + l; Color c = b.GetPixel(xc, yc); hc[0] = c.R; hc[1] = c.G; hc[2] = c.B; for (int m = 0; m < hc.Length; m++) { AliasName ext = extColors[k, l, m]; if (ext != null) { ext.SetValue(((double)hc[m]) / 255); } } } } update(); for (int n = 0; n < measures.Length; n++) { IMeasurement mea = measures[n]; if (mea == null) { hco[n] = 0; } else { double cd = (double)mea.Parameter(); int cn = (int)(cd * 255); if (cn > 255) { cn = 255; } hco[n] = cn; } } Color co = Color.FromArgb(255, hco[0], hco[1], hco[2]); bmp.SetPixel(i, j, co); } } }
public PropertyDescriptor(object obj, string propertyName) { //reporter = DetentionReporter.Create(c => SetObjectPropertyValue(c), 1, 1, false); //are = new AutoResetEvent(false); Editable = true; var pi = obj.GetType().GetProperty(propertyName); var dt = pi.PropertyType.IsNullableGeneric() ? DotNetTypeAttribute.GetType(pi.PropertyType.GetGenericTypeInNullable()) : DotNetTypeAttribute.GetType(pi.PropertyType); Object = obj; PropertyInfo = pi; Type = dt; Name = pi.Name; Nullable = pi.PropertyType.IsNullable(); var ra = pi.GetAttribute <RequiredAttribute>(); Nullable = Nullable ? ra == null : Nullable; Required = ra != null; var dta = pi.GetAttribute <DataColumnAttribute>(); Nullable = Nullable && dta != null ? dta.Nullable : Nullable; var wa = pi.GetAttribute <WatermaskLanguageAttribute>(); Watermask = wa == null ? string.Empty : wa.Name; var ga = pi.GetAttribute <GalleryLanguageAttribute>(); Gallery = ga == null ? string.Empty : ga.Name; var da = pi.GetAttribute <DisplayLanguageAttribute>(); AliasName = da == null ? null : da.Name; var da1 = pi.GetAttribute <DisplayNameAttribute>(); AliasName = AliasName.IsNullOrBlank() && da1 != null ? da1.DisplayName : AliasName; var da2 = pi.GetAttribute <DisplayAttribute>(); AliasName = AliasName.IsNullOrBlank() && da2 != null ? da2.Name : AliasName; AliasName = AliasName.IsNullOrBlank() ? pi.Name : AliasName; var pa = pi.GetAttribute <DescriptionLanguageAttribute>(); Description = pa == null ? AliasName : pa.Description; var ppa = pi.GetAttribute <PropertyDescriptorAttribute>(); Image = ppa != null && !ppa.UriImage16.IsNullOrBlank() ? BitmapFrame.Create(new Uri(ppa.UriImage16)) : null; var ia = pi.GetAttribute <ImageAttribute>(); Image = Image == null ? (ia == null || ia.ImageUri.IsNullOrBlank() ? Image : (BitmapFrame.Create(new Uri(ia.ImageUri)))) : Image; var pda = pi.GetAttribute <PropertyDescriptorAttribute>(); if (pda != null) { var t = pda.CreateTrigger(); if (t != null) { Trigger = t; } } if (Trigger == null) { Trigger = new PropertyTrigger(); } _value = obj.GetPropertyValue(propertyName); var b = new Binding("Value"); b.Source = this; var tb = new TextBlock(); tb.HorizontalAlignment = HorizontalAlignment.Stretch; tb.VerticalAlignment = VerticalAlignment.Center; tb.SetBinding(TextBlock.TextProperty, b); tb.SetBinding(TextBlock.ToolTipProperty, b); Designer = tb; }
public QueryVyberPracovnikyFiltrXOInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("PRAC", TablePracInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), AliasName.Create("ppracovnik_id", "pracovnik_id"), SimpleName.Create("logicky_zrusen"), SimpleName.Create("logicky_neuplny"), SimpleName.Create("osobni_cislo"), SimpleName.Create("rodne_cislo"), SimpleName.Create("nema_rodcis"), SimpleName.Create("prijmeni"), SimpleName.Create("jmeno"), SimpleName.Create("titul_pred"), SimpleName.Create("titul_za"), SimpleName.Create("datum_narozeni"), SimpleName.Create("pohlavi") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("PPOMER", TablePpomerInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("cislo_pp"), SimpleName.Create("pompopis"), SimpleName.Create("funkce"), SimpleName.Create("praczac"), SimpleName.Create("prackon"), SimpleName.Create("druh"), SimpleName.Create("druh07"), SimpleName.Create("ppomer_cislo"), SimpleName.Create("kzam"), SimpleName.Create("platova_trida"), SimpleName.Create("platovy_stupen"), SimpleName.Create("spraxe_roku"), SimpleName.Create("praxe_dnu") )); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("OPR", QueryVyberPracOpravneniInfo.GetDictValue(lpszOwnerName, lpszUsersName).GetTableDef()). AddColumns( AliasName.Create("mesic", "zar_mesic"), AliasName.Create("mesic", "opr_mesic"), SimpleName.Create("uzivjmeno"), SimpleName.Create("nazev_utvar"), SimpleName.Create("cislo_zeme"), SimpleName.Create("uzivatel_id"), SimpleName.Create("personal_id"), SimpleName.Create("prohlizet_id"), SimpleName.Create("omezproh_id"), SimpleName.Create("referzp_id"), SimpleName.Create("uziv_pres"), SimpleName.Create("pers_pres"), SimpleName.Create("proh_pres"), SimpleName.Create("omez_pres"), SimpleName.Create("refz_pres"), SimpleName.Create("uutvar_id"), SimpleName.Create("vyuctgr"), SimpleName.Create("vyuct_cast"), SimpleName.Create("uupres_id"), SimpleName.Create("nazev_upres") )); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("PRAC", "PPOMER"). AddColumn("firma_id", "firma_id"). AddColumn("ppracovnik_id", "pracovnik_id")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("PPOMER", "OPR"). AddColumn("firma_id", "firma_id"). AddColumn("pracovnik_id", "pracovnik_id")); }
public QueryVyberPracovnikyInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("VPFZ", QueryVyberPracovnikyFiltrZPInfo.GetDictValue(lpszOwnerName, lpszUsersName).GetTableDef()). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("pracovnik_id"), AliasName.Create("zar_mesic", "mesic"), SimpleName.Create("logicky_zrusen"), SimpleName.Create("logicky_neuplny"), SimpleName.Create("osobni_cislo"), SimpleName.Create("rodne_cislo"), SimpleName.Create("nema_rodcis"), SimpleName.Create("prijmeni"), SimpleName.Create("jmeno"), SimpleName.Create("titul_pred"), SimpleName.Create("titul_za"), SimpleName.Create("cislo_pp"), SimpleName.Create("pompopis"), SimpleName.Create("funkce"), SimpleName.Create("praczac"), SimpleName.Create("prackon"), SimpleName.Create("druh"), SimpleName.Create("druh07"), SimpleName.Create("uzivjmeno"), SimpleName.Create("nazev_utvar"), SimpleName.Create("cislo_zeme"), SimpleName.Create("datum_narozeni"), SimpleName.Create("pohlavi"), SimpleName.Create("ppomer_cislo"), SimpleName.Create("kzam"), SimpleName.Create("platova_trida"), SimpleName.Create("platovy_stupen"), SimpleName.Create("spraxe_roku"), SimpleName.Create("praxe_dnu"), SimpleName.Create("uzivatel_id"), SimpleName.Create("personal_id"), SimpleName.Create("prohlizet_id"), SimpleName.Create("omezproh_id"), SimpleName.Create("referzp_id"), SimpleName.Create("uziv_pres"), SimpleName.Create("pers_pres"), SimpleName.Create("proh_pres"), SimpleName.Create("omez_pres"), SimpleName.Create("refz_pres"), SimpleName.Create("uutvar_id"), SimpleName.Create("vyuctgr"), SimpleName.Create("vyuct_cast"), SimpleName.Create("uupres_id"), SimpleName.Create("nazev_upres"), SimpleName.Create("cislo_utvar"), SimpleName.Create("cislo_zdrpoj"), SimpleName.Create("cislo_zdroj"), SimpleName.Create("cislo_stred"), SimpleName.Create("cislo_cinnost"), SimpleName.Create("cislo_zakazka"), SimpleName.Create("ppomer_zdroj"), SimpleName.Create("ppomer_stred"), SimpleName.Create("ppomer_cinnost"), SimpleName.Create("ppomer_zakazka") )); AddFiltr(QueryWhereDefInfo.GetQueryWhereDefInfo("VPFZ", QueryVyberPracovnikyFiltrZPInfo.GetDictValue(lpszOwnerName, lpszUsersName).GetTableDef()). AddConstraints( QueryFilterDefInfo.Create("zar_mesic", "=", "opr_mesic") )); }
public QueryVyberPracPocitanyInfo(string lpszOwnerName, string lpszUsersName) : base(lpszOwnerName, lpszUsersName, TABLE_NAME, 1600) { AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("VPFZ", TablePracVyberAggrInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("firma_id"), SimpleName.Create("pracovnik_id"), AliasName.Create("zar_mesic", "mesic"), SimpleName.Create("zar_mesic"), SimpleName.Create("opr_mesic"), SimpleName.Create("logicky_zrusen"), SimpleName.Create("logicky_neuplny"), SimpleName.Create("osobni_cislo"), SimpleName.Create("rodne_cislo"), SimpleName.Create("nema_rodcis"), SimpleName.Create("prijmeni"), SimpleName.Create("jmeno"), SimpleName.Create("titul_pred"), SimpleName.Create("titul_za"), SimpleName.Create("cislo_pp"), SimpleName.Create("pompopis"), SimpleName.Create("funkce"), SimpleName.Create("praczac"), SimpleName.Create("prackon"), SimpleName.Create("druh"), SimpleName.Create("druh07"), SimpleName.Create("datum_narozeni"), SimpleName.Create("pohlavi"), SimpleName.Create("ppomer_cislo"), SimpleName.Create("kzam"), SimpleName.Create("platova_trida"), SimpleName.Create("platovy_stupen"), SimpleName.Create("spraxe_roku"), SimpleName.Create("praxe_dnu"), SimpleName.Create("cislo_zdrpoj"), SimpleName.Create("cislo_zdroj"), SimpleName.Create("cislo_stred"), SimpleName.Create("cislo_cinnost"), SimpleName.Create("cislo_zakazka"), SimpleName.Create("ppomer_zdroj"), SimpleName.Create("ppomer_stred"), SimpleName.Create("ppomer_cinnost"), SimpleName.Create("ppomer_zakazka"), SimpleName.Create("cislo_utvar"), SimpleName.Create("uutvar_id"), SimpleName.Create("vyuct_cast"), SimpleName.Create("uupres_id"))); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UTVAR", TableUtvarInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( AliasName.Create("utvnazev", "nazev_utvar"), AliasName.Create("zeme_cislo", "cislo_zeme"), SimpleName.Create("uzivatel_id"), SimpleName.Create("personal_id"), SimpleName.Create("prohlizet_id"), SimpleName.Create("omezproh_id"), SimpleName.Create("referzp_id"))); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UPRES", TableUtvarInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( AliasName.Create("utvnazev", "nazev_upres"), AliasName.Create("uzivatel_id", "uziv_pres"), AliasName.Create("personal_id", "pers_pres"), AliasName.Create("prohlizet_id", "proh_pres"), AliasName.Create("omezproh_id", "omez_pres"), AliasName.Create("referzp_id", "refz_pres"))); AddTable(QueryTableDefInfo.GetQueryAliasDefInfo("UZIVATEL", TableUzivatelInfo.GetDictValue(lpszOwnerName, lpszUsersName)). AddColumns( SimpleName.Create("uzivjmeno"))); AddTableJoin(QueryJoinDefInfo.GetQueryFirstJoinDefInfo("VPFZ", "UTVAR"). AddColumn("firma_id", "firma_id"). AddColumn("cislo_utvar", "uutvar_id")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("VPFZ", "UPRES"). AddColumn("firma_id", "firma_id"). AddColumn("uupres_id", "uutvar_id")); AddTableJoin(QueryJoinDefInfo.GetQueryJoinDefInfo("UTVAR", "UZIVATEL"). AddColumn("firma_id", "firma_id"). AddColumn("uzivatel_id", "uuzivatel_id")); }
public override string ToString() { return(AliasName + (AliasName.EndsWith(";") ? "" : ";")); }