public override void DescribeTree(TreeView tree, DataTable T, string ListingType) { //Aggiorno le intestazioni del DataGrid if (ListingType == "tree") { base.DescribeColumns(T, ListingType); foreach (DataColumn C in T.Columns) { DescribeAColumn(T, C.ColumnName, "", -1); } DescribeAColumn(T, "codeacc", "Codice", 1); DescribeAColumn(T, "account", "Denominazione", 2); } base.DescribeTree(tree, T, ListingType); string filterc = QHC.CmpEq("nlevel", "1"); string filtersql = QHS.CmpEq("nlevel", "1"); int maxlevel = 0; string filterEsercizio = QHS.CmpEq("ayear", GetSys("esercizio")); object o = Conn.DO_READ_VALUE("accountlevel", filterEsercizio, "max(nlevel)"); if ((o != null) && (o != DBNull.Value)) { maxlevel = Convert.ToInt32(o); } TreeViewManager M = new TreeViewAccountPrevisionView(Conn, T, tree, filterc, filtersql, maxlevel); myGetData.SetStaticFilter("accountlevel", filterEsercizio); }
public int GetImpersonatedAuthAgency(DataAccess Conn) { QueryHelper QHS; string idflowchart; if (Conn.GetSys("idflowchart") == null && Conn.GetSys("idflowchart").ToString() == "") { return(0); } // lookup idauthagency from idflowchart idflowchart = Conn.GetSys("idflowchart").ToString(); QHS = Conn.GetQueryHelper(); string filter; filter = QHS.CmpEq("idflowchart", idflowchart); DataTable DT = Conn.RUN_SELECT("flowchartauthagency", "*", null, filter, null, false); if (DT == null || DT.Rows.Count == 0) { return(0); } return(CfgFn.GetNoNullInt32(DT.Rows[0]["idauthagency"])); }
public override void SetDefaults(DataTable PrimaryTable) { base.SetDefaults(PrimaryTable); SetDefault(PrimaryTable, "ypro", GetSys("esercizio").ToString()); SetDefault(PrimaryTable, "adate", GetSys("datacontabile")); //DataTable TT = Conn.RUN_SELECT("config","flagfruitful",null, // "(ayear="+QueryCreator.quotedstrvalue(GetSys("esercizio"),false)+ ")",null,false); //int flag = CfgFn.GetNoNullInt32(PrimaryTable.Columns["flag"].DefaultValue); //if ((TT.Rows.Count != 0) && (TT != null)) { // flag = flag & 0xF7; // if (TT.Rows[0]["flagfruitful"].ToString().ToUpper() == "F") { // flag = flag + 0x08; //def. Fruttifero // } // SetDefault(PrimaryTable,"flag", flag); //} if (flagautostampa == null) { flagautostampa = Conn.DO_READ_VALUE("config", QHS.CmpEq("ayear", GetSys("esercizio")), "proceeds_flagautoprintdate"); } if ((flagautostampa != null) && (flagautostampa.ToString().ToUpper() == "S")) { SetDefault(PrimaryTable, "printdate", GetSys("datacontabile")); } }
public override void DescribeTree(TreeView tree, DataTable T, string ListingType) { bool all = false; base.DescribeTree(tree, T, ListingType); //Aggiorno le intestazioni del DataGrid if (ListingType == "tree") { base.DescribeColumns(T, ListingType); foreach (DataColumn C in T.Columns) { DescribeAColumn(T, C.ColumnName, ""); } DescribeAColumn(T, "leveldescr", "Livello"); DescribeAColumn(T, "apfinancialactivitycode", "Codice"); DescribeAColumn(T, "description", "Descrizione"); } if (ListingType == "treeall") { base.DescribeColumns(T, ListingType); foreach (DataColumn C in T.Columns) { DescribeAColumn(T, C.ColumnName, ""); } DescribeAColumn(T, "leveldescr", "Livello"); DescribeAColumn(T, "apfinancialactivitycode", "Codice"); DescribeAColumn(T, "description", "Descrizione"); all = true; } string filterc = QHC.CmpEq("nlevel", 1); string filtersql = QHS.CmpEq("nlevel", 1); TreeViewManager M = new TreeAttivitaEconomicaView(T, tree, filterc, filtersql, all); }
//string[] mykey = new string[] { "idcsa_import", "idcsa_agency"}; //public override string[] primaryKey() { // return mykey; //} public override string GetStaticFilter(string ListingType) { string filteresercizio; string filtertipo = ""; filteresercizio = QHS.CmpEq("yimport", GetSys("esercizio")); if (ListingType == "versamentiannuali") { return(filteresercizio); } //switch (ListingType) { // case "ritenuta": // filtertipo = QHS.CmpEq("kind", "Ritenuta"); // break; // case "contributo": // filtertipo = QHS.CmpEq("kind", "Contributo"); // break; // case "recupero": // filtertipo = QHS.CmpEq("kind","Recupero"); // break; // case "versamentiannuali": // filtertipo = QHS.CmpEq("kind", "Voce CSA"); // break; //} if (ListingType == "versamentiannuali") { return(QHS.AppAnd(filteresercizio)); } return(base.GetStaticFilter(ListingType)); }
private string veroTipoFatturaAv(object idInvKind) { if (veroTipo.ContainsKey(idInvKind.ToString())) { return(veroTipo[idInvKind.ToString()]); } string filterreg = QHS.CmpEq("idinvkind", idInvKind); DataTable invRegKind = Conn.RUN_SELECT("invoicekindregisterkind", "*", null, filterreg, null, false); DataRow[] registerToLink = invRegKind.Select(); bool acquisto = false; foreach (DataRow iReg in registerToLink) { object regClass = Conn.DO_READ_VALUE("ivaregisterkind", QHS.CmpEq("idivaregisterkind", iReg["idivaregisterkind"]), "registerclass"); if (regClass.ToString().ToUpper() == "A") { acquisto = true; } } veroTipo[idInvKind.ToString()] = (acquisto ? "A" : "V"); return(veroTipo[idInvKind.ToString()]); }
void SetCodice() { //MetaData Meta = MetaData.GetMetaData(this); if (Meta.EditMode) { return; } btnCodice.Enabled = (cmbTipo.SelectedIndex > 0); txtCodice.ReadOnly = (cmbTipo.SelectedIndex <= 0); if (cmbTipo.SelectedIndex <= 0) { txtCodice.Text = ""; txtDescrizione.Text = ""; } else { string filter = QHS.CmpEq("idsorkind", cmbTipo.SelectedValue); btnCodice.Tag = "manage.sorting.tree." + filter; //label per il form di selezione della voce di classificazione +"."+ filtro DS.sorting.ExtendedProperties[MetaData.ExtraParams] = filter; //AutoManage.txtCodiceClass.tree gboxclass.Tag = "AutoManage.txtCodice.tree." + filter; MetaData.GetMetaData(this).SetAutoMode(gboxclass); } }
protected void Page_Load(object sender, EventArgs e) { string idlist = Request.QueryString["idlist"]; if (idlist == null || idlist == "") { return; } DataAccess Conn = GetVars.GetUserConn(Page); QueryHelper QHS; QHS = Conn.GetQueryHelper(); string filter = QHS.CmpEq("idlist", idlist); DataTable DT = Conn.RUN_SELECT("list", "pic,picext", null, filter, null, false); if (DT.Rows.Count == 0) { return; } DataRow DR = DT.Rows[0]; if (DR["pic"].Equals(DBNull.Value)) { return; } string fileext = DR["picext"].ToString(); Page.Response.ContentType = "image/" + fileext; Page.Response.BinaryWrite((byte[])DR["pic"]); Page.Response.End(); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { string testoMessaggio = "Bisogna inserire i dati nel form di configurazione della prestazione occasionale"; DataTable configurazione = T.DataSet.Tables["config"]; DataRow [] configrow = configurazione.Select(QHC.CmpEq("ayear", GetSys("esercizio"))); if (configrow.Length == 0) { MessageBox.Show(testoMessaggio, "Prestazione Occasionale - Dati Mancanti", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(null); } int flag_autodocnumbering = CfgFn.GetNoNullInt32(configrow[0]["flag_autodocnumbering"]); string kind = ((flag_autodocnumbering & 0x20) == 0) ? "A" : "M"; if (kind.ToUpper() == "A") { string reset = configrow[0]["casualcontract_flagrestart"].ToString(); if (reset.ToUpper() == "S") { RowChange.SetSelector(T, "ycon"); } RowChange.MarkAsAutoincrement(T.Columns["ncon"], null, null, 0); } else { int nmax = CfgFn.GetNoNullInt32( Conn.DO_READ_VALUE("casualcontract", QHS.CmpEq("ycon", GetSys("esercizio")), "MAX(ncon)")) + 1; SetDefault(T, "ncon", nmax); } return(base.Get_New_Row(ParentRow, T)); }
public override DataRow SelectByCondition(string filter, string searchtable) { if (edit_type == "treealle" || edit_type == "treealls" || edit_type == "treeallenew" || edit_type == "treeallsnew" ) { return(base.SelectByCondition(filter, "finview")); } //string filternoupb= removefilterupb(filter); //int ResultCount = Conn.RUN_SELECT_COUNT("finusable", filternoupb, true); int ResultCount = Conn.RUN_SELECT_COUNT("finview", QHS.AppAnd(filter, QHS.CmpEq("flagusable", "S")), true); if (ResultCount != 1) { return(null); } DataTable T2 = Conn.RUN_SELECT("finview", null, null, filter, null, true); if (T2 == null) { return(null); } if (T2.Rows.Count == 0) { return(null); } return(CheckSelectRow(T2.Rows[0])); }
//modifiche luigi 8179 public override void WebDescribeTree(hwTreeView tree, DataTable T, string ListingType) { int maxDepth = 9; bool withdescr = true; if (ListingType == "default") { base.DescribeColumns(T, ListingType); foreach (DataColumn C in T.Columns) { DescribeAColumn(T, C.ColumnName, ""); } DescribeAColumn(T, "idlocation", "Id Ubicazione"); DescribeAColumn(T, "locationcode", "Codice Ubicazione"); DescribeAColumn(T, "description", "Ubicazione"); } base.WebDescribeTree(tree, T, ListingType); string filterc = QHC.CmpEq("nlevel", 1); string filtersql = QHS.CmpEq("nlevel", 1); easy_node_dispatcher D = new location_node_dispatcher( "locationlevel", "nlevel", "description", null, "description", "locationcode" ); WebTreeViewlocation M = new WebTreeViewlocation(T, tree, filterc, filtersql, maxDepth, withdescr); }
public override void DescribeTree(TreeView tree, DataTable T, string ListingType) { //Aggiorno le intestazioni del DataGrid if (ListingType == "tree") { base.DescribeColumns(T, ListingType); foreach (DataColumn C in T.Columns) { DescribeAColumn(T, C.ColumnName, "", -1); } DescribeAColumn(T, "leveldescr", "Livello", 1); DescribeAColumn(T, "sortcode", "Codice", 2); DescribeAColumn(T, "description", "Denominazione", 3); DescribeAColumn(T, "movkind", "Tipo movimento", 4); DescribeAColumn(T, "printingorder", "Ordine stampa", 5); DescribeAColumn(T, "incomeprevision", "Budget Ricavi", 6); DescribeAColumn(T, "expenseprevision", "Budget Costi", 7); } base.DescribeTree(tree, T, ListingType); string filterc = QHC.CmpEq("nlevel", 1); string filtersql = QHS.CmpEq("nlevel", 1); int eserc = CfgFn.GetNoNullInt32(GetSys("esercizio")); filterc = QHC.AppAnd(filterc, QHC.NullOrLe("start", eserc), QHC.NullOrGe("stop", eserc)); filtersql = QHC.AppAnd(filtersql, QHS.NullOrLe("start", eserc), QHS.NullOrGe("stop", eserc)); TreeViewManager M = new TreeViewClassMovimentiView(T, tree, filterc, filtersql); }
public override string GetStaticFilter(string ListingType) { string filteresercizio; string filtertipo = ""; filteresercizio = QHS.CmpEq("ayear", GetSys("esercizio")); if (ListingType == "elenco") { return(filteresercizio); } switch (ListingType) { case "ritenuta": filtertipo = QHS.CmpEq("kind", "Ritenuta"); break; case "contributo": filtertipo = QHS.CmpEq("kind", "Contributo"); break; case "recupero": filtertipo = QHS.CmpEq("kind", "Recupero"); break; } if ((ListingType == "ritenuta") || (ListingType == "contributo") || (ListingType == "recupero")) { return(QHS.AppAnd(filteresercizio, filtertipo)); } return(base.GetStaticFilter(ListingType)); }
public override void AfterLink(bool firsttime, bool formToLink) { fintree.SelectedNodeStyle.BackColor = System.Drawing.Color.Gray; Meta.CanSave = false; Meta.CanInsert = false; Meta.SearchEnabled = false; fintree.Tag = "finview." + Meta.edit_type; string param = Meta.ExtraParameter as string; string filterEsercizio = QHS.CmpEq("ayear", Meta.GetSys("esercizio")); string filter = GetData.MergeFilters(filterEsercizio, param); string oldfilter = GetData.MergeFilters(null, DS.finlevel); if (oldfilter == null) { GetData.SetStaticFilter(DS.finlevel, filterEsercizio); } GetData.CacheTable(DS.finlevel); if (Meta.edit_type != "treeeupbnew" && Meta.edit_type != "treesupbnew") { GetData.SetStaticFilter(DS.finview, filter); } GetData.SetSorting(DS.finview, "printingorder"); }
public void FillManagerData() { string idman = Request.Form["txtidman"]; if (idman == null || idman == "") { lblError.Text = ""; return; } string filter; DataAccess Conn = (DataAccess)Session["DBUserConn"]; QueryHelper QHS; QHS = Conn.GetQueryHelper(); filter = QHS.CmpEq("idman", idman); DataTable DT = Conn.RUN_SELECT("manager", "*", null, filter, null, false); if (DT == null || DT.Rows.Count == 0) { lblError.Text = "Problema sul DB di sistema."; return; } txtlogin.Text = DT.Rows[0]["userweb"].ToString(); txtidman.Text = ""; return; }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { DataTable tConfigurazione = T.DataSet.Tables["config"]; DataRow[] rConfig = tConfigurazione.Select(QHC.CmpEq("ayear", GetSys("esercizio"))); if (rConfig.Length == 0) { MessageBox.Show("Bisogna inserire i dati nel form di configurazione del contratto", "Contratto - Dati Mancanti", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(null); } int flag_autodocnumbering = CfgFn.GetNoNullInt32(rConfig[0]["flag_autodocnumbering"]); string kind = ((flag_autodocnumbering & 0x10) == 0) ? "A" : "M"; RowChange.SetSelector(T, "ycon"); RowChange.MarkAsAutoincrement(T.Columns["idcon"], null, Conn.GetSys("esercizio").ToString().Substring(2, 2), 6); if (kind.ToUpper() == "A") { RowChange.MarkAsAutoincrement(T.Columns["ncon"], null, null, 0); } else { int nmax = CfgFn.GetNoNullInt32( Conn.DO_READ_VALUE("parasubcontract", QHS.CmpEq("ycon", GetSys("esercizio")) , "MAX(CONVERT(int,ncon))")) + 1; SetDefault(T, "ncon", nmax); } return(base.Get_New_Row(ParentRow, T)); }
public void FillRegistryData() { string idregistryreference = Request.Form["txtidregistryreference"]; if (idregistryreference == null || idregistryreference == "") { lblError.Text = ""; return; } string filter; string[] arr = idregistryreference.Split('|'); string idreg = arr[0]; string idregref = arr[1]; DataAccess Conn = (DataAccess)Session["DBUserConn"]; QueryHelper QHS; QHS = Conn.GetQueryHelper(); filter = QHS.AppAnd(QHS.CmpEq("idregistryreference", idregref), QHS.CmpEq("idreg", idreg)); DataTable DT = Conn.RUN_SELECT("registryreference", "*", null, filter, null, false); if (DT == null || DT.Rows.Count == 0) { lblError.Text = "Problema sul DB di sistema."; return; } txtlogin.Text = DT.Rows[0]["userweb"].ToString(); txtidregistryreference.Text = ""; return; }
public void FillCustomUserData() { string idcustomuser = Request.Form["txtidcustomuser"]; if (idcustomuser == null || idcustomuser == "") { lblError.Text = ""; return; } string filter; DataAccess Conn = (DataAccess)Session["DBUserConn"]; QueryHelper QHS; QHS = Conn.GetQueryHelper(); filter = QHS.CmpEq("idcustomuser", idcustomuser); DataTable DT = Conn.RUN_SELECT("customuser", "*", null, filter, null, false); if (DT == null || DT.Rows.Count == 0) { lblError.Text = "Problema sul DB di sistema."; return; } txtcustuser.Text = DT.Rows[0]["idcustomuser"].ToString(); if (Request.Form["userkind"].ToString() == "3") { txtlogin.Text = DT.Rows[0]["username"].ToString(); } txtidcustomuser.Text = ""; }
public override void DescribeTree(System.Windows.Forms.TreeView tree, DataTable T, string ListingType) { bool all = false; //Aggiorno le intestazioni del DataGrid if (ListingType == "tree" || ListingType == "treeall" || ListingType == "treenew" || ListingType == "treeminusable") { base.DescribeColumns(T, ListingType); foreach (DataColumn C in T.Columns) { DescribeAColumn(T, C.ColumnName, ""); } DescribeAColumn(T, "!livello", "Livello", "accountlevel.description"); DescribeAColumn(T, "codeacc", "Codice"); DescribeAColumn(T, "title", "Denominazione"); } base.DescribeTree(tree, T, ListingType); int esercizio = Convert.ToInt32(GetSys("esercizio")); int esercizionew = esercizio + 1; string filteresercizio = QHC.CmpEq("ayear", GetSys("esercizio")); string filterc = QHC.CmpEq("nlevel", "1"); string filtersql = QHS.CmpEq("nlevel", "1"); int maxlevel = 0; object o = Conn.DO_READ_VALUE("accountlevel", filteresercizio, "max(nlevel)"); if ((o != null) && (o != DBNull.Value)) { maxlevel = Convert.ToInt32(o); } int minlevelop = CfgFn.GetNoNullInt32(GetSys("accountusablelevel")); string filterAccountLevel = filteresercizio; if (ListingType == "treeminusable") { maxlevel = minlevelop; string filterenablebudgetprev = QHS.NullOrEq("flagenablebudgetprev", "S"); filterAccountLevel = QHS.AppAnd(QHS.CmpEq("ayear", esercizionew), QHS.CmpLe("nlevel", minlevelop), filterenablebudgetprev); } // TreeViewAccount M = new TreeViewAccount(Conn, T, tree, filter, maxlevel); // myGetData.SetStaticFilter("accountevel","(ayear='"+GetSys("esercizio").ToString()+"')"); // if (ListingType == "treeall") { all = true; } if (ListingType == "treenew") { //string livsupid = esercizionew.ToString().Substring(2); //filter = "(paridacc is null + QueryCreator.quotedstrvalue(livsupid, true) + ")"; filterAccountLevel = QHS.CmpEq("ayear", esercizionew); all = true; } TreeViewAccount M = new TreeViewAccount(Conn, T, tree, filterc, filtersql, all, maxlevel); myGetData.SetStaticFilter("accountlevel", filterAccountLevel); }
public override string GetStaticFilter(string ListingType) { if (ListingType == "lista") { return(QHS.CmpEq("ypro", Conn.GetSys("esercizio"))); } return(base.GetStaticFilter(ListingType)); }
public Class_SelectionManager(MetaData Meta, TextBox TxtCode, TextBox TxtTitle, object idsorkind) : base(Meta, TxtCode, "sortcode", "idsor", "sorting") { this.TTitle = TxtTitle; this.idsorkind = idsorkind; SetFilter(QHS.CmpEq("idsorkind", idsorkind)); }
public override string GetStaticFilter(string ListingType) { if (ListingType == "default") { return(QHS.CmpEq("yvar", GetSys("esercizio"))); } return(base.GetStaticFilter(ListingType)); }
public override string GetStaticFilter(string ListingType) { if ((ListingType == "default") || (ListingType == "tree") || (ListingType == "treall")) { string filteresercizio = QHS.CmpEq("ayear", GetSys("esercizio")); return(filteresercizio); } return(base.GetStaticFilter(ListingType)); }
public override void SetDefaults(DataTable PrimaryTable) { base.SetDefaults(PrimaryTable); SetDefault(PrimaryTable, "extraallowance", 0.0); SetDefault(PrimaryTable, "advancepercentage", 0.0); SetDefault(PrimaryTable, "idcurrency", Conn.DO_READ_VALUE("currency", QHS.CmpEq("codecurrency", "EUR"), "idcurrency")); SetDefault(PrimaryTable, "exchangerate", 1.0); SetDefault(PrimaryTable, "flag_geo", "I"); }
public override string GetStaticFilter(string ListingType) { if (ListingType == "listaestesa") { string filteresercizio = QHS.CmpEq("yentry", GetSys("esercizio")); return(filteresercizio); } return(base.GetStaticFilter(ListingType)); }
override public DataRow Get_New_Row(DataRow ParentRow, DataTable T) { if (edit_type == "default") { if (ParentRow != null) { SetDefault(T, "idfin", ParentRow["idfin"]); SetDefault(T, "paridfin", ParentRow["paridfin"]); SetDefault(T, "codefin", ParentRow["codefin"]); SetDefault(T, "finance", ParentRow["finance"]); } } if (edit_type == "previsionupb") { if (ParentRow != null) { SetDefault(T, "idfin", ParentRow["idfin"]); SetDefault(T, "paridfin", ParentRow["paridfin"]); SetDefault(T, "codefin", ParentRow["codefin"]); SetDefault(T, "finance", ParentRow["title"]); SetDefault(T, "flag", ParentRow["flag"]); SetDefault(T, "nlevel", ParentRow["nlevel"]); int flag = CfgFn.GetNoNullInt32(ParentRow["flag"]); object finpart = DBNull.Value; if ((flag & 1) == 1) { finpart = "S"; } else { finpart = "E"; } SetDefault(T, "finpart", finpart); string filterfinlevel = QHS.AppAnd(QHS.CmpEq("ayear", Conn.GetSys("esercizio")), QHS.CmpEq("nlevel", ParentRow["nlevel"])); object leveldescr = Conn.DO_READ_VALUE("finlevel", filterfinlevel, "description"); SetDefault(T, "leveldescr", leveldescr); } } if (edit_type == "previsionfin") { if (ParentRow != null) { SetDefault(T, "idupb", ParentRow["idupb"]); SetDefault(T, "paridupb", ParentRow["paridupb"]); SetDefault(T, "codeupb", ParentRow["codeupb"]); SetDefault(T, "upb", ParentRow["title"]); } } DataRow R = base.Get_New_Row(ParentRow, T); return(R); }
private static int GetMaxNpro_Treasurer(DataRow R, DataAccess Conn) { QueryHelper QHS; QHS = Conn.GetQueryHelper(); var qhc = new CQueryHelper(); object idtreasurer = R["idtreasurer"]; if ((idtreasurer == DBNull.Value) || (CfgFn.GetNoNullInt32(idtreasurer) == 0)) { return(-1); } object flagautondoc_treasurer = null; if (enable_ndoc_treasurers.ContainsKey((int)idtreasurer)) { flagautondoc_treasurer = enable_ndoc_treasurers[(int)idtreasurer]; } else { if (R.Table.DataSet.Tables.Contains("treasurer") && R.Table.DataSet.Tables["treasurer"].Columns.Contains("enable_ndoc_treasurer") ) { DataTable ttr = R.Table.DataSet.Tables["treasurer"]; var foundTr = ttr.Select(qhc.CmpEq("idtreasurer", idtreasurer)); if (foundTr.Length > 0) { flagautondoc_treasurer = foundTr[0]["enable_ndoc_treasurer"]; enable_ndoc_treasurers[(int)idtreasurer] = flagautondoc_treasurer; } } } if (flagautondoc_treasurer == null) { flagautondoc_treasurer = Conn.DO_READ_VALUE("treasurer", QHS.CmpEq("idtreasurer", idtreasurer), "enable_ndoc_treasurer"); enable_ndoc_treasurers[(int)idtreasurer] = flagautondoc_treasurer; } if ((flagautondoc_treasurer != null) && (flagautondoc_treasurer != DBNull.Value) && (flagautondoc_treasurer.ToString().ToUpper() == "S")) { int numiniziale = 0; string sqlmax = "SELECT ISNULL(MAX(npro_treasurer)," + numiniziale.ToString() + ") + 1 FROM proceeds WHERE " + QHS.AppAnd(QHS.CmpEq("idtreasurer", idtreasurer), QHS.CmpEq("ypro", R["ypro"])); DataTable t = Conn.SQLRunner(sqlmax, true, 0); return(CfgFn.GetNoNullInt32(t.Rows[0][0])); } return(-1); }
public override string GetStaticFilter(string ListingType) { string filteresercizio = QHS.CmpEq("ayear", GetSys("esercizio")); string basefilter = base.GetStaticFilter(ListingType); if (string.IsNullOrEmpty(basefilter)) { return(filteresercizio); } return(QHS.AppAnd(basefilter, filteresercizio)); }
public void FillShowcases() { DataTable TStore = Conn.RUN_SELECT("store", "*", null, QHS.AppAnd(QHS.NullOrEq("active", "S"), Conn.Security.SelectCondition("store", true)), null, false); //DataTable DT = DataAccess.RUN_SELECT(Conn, "showcase", "*", "title asc", null, false); string Query = " SELECT showcase.idshowcase as idshowcase, showcase.idstore as idstore, showcase.title as title FROM showcase JOIN store "; Query += " on (showcase.idstore = store.idstore) WHERE store.active='S'"; DataTable DT = Conn.SQLRunner(Query); if (DT == null || DT.Rows.Count == 0) { return; } //Cancella le vetrine non associate a magazzini autorizzati foreach (DataRow r in DT.Select()) { string search = QHS.CmpEq("idstore", r["idstore"]); if (TStore.Select(search).Length > 0) { continue; } r.Delete(); } DT.AcceptChanges(); foreach (DataRow DR in DT.Rows) { string Label = DR["title"].ToString(); string id = DR["idshowcase"].ToString(); string idstore = DR["idstore"].ToString(); hwButton HB = new hwButton(); HB.ID = "btnShowcase_" + id + "_" + idstore; HB.CssClass = "showcasebutton"; /* * HB.Style.Add("border", "0px"); * HB.Style.Add("background-color", "white"); * HB.Style.Add("cursor", "hand"); * HB.Style.Add(); */ HB.Tag = "showcase." + id + "." + idstore; HB.Text = Label; showcases.Controls.Add(HB); HtmlGenericControl br = new HtmlGenericControl("br"); showcases.Controls.Add(br); } }
public override string GetStaticFilter(string ListingType) { string filteresercizio; if (ListingType == "default") { filteresercizio = QHS.CmpEq("yadmpay", GetSys("esercizio")); return(filteresercizio); } return(base.GetStaticFilter(ListingType)); }