public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "idpaydisposition"); RowChange.MarkAsAutoincrement(T.Columns["iddetail"], null, null, 7); RowChange.setMinimumTempValue(T.Columns["iddetail"], 900000); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.MarkAsAutoincrement(T.Columns["idassetunload"], null, null, 7); RowChange.MarkAsAutoincrement(T.Columns["nassetunload"], null, null, 7); RowChange.MarkAsCustomAutoincrement(T.Columns["nassetunload"], new RowChange.CustomCalcAutoID(CalcID)); DataRow R = base.Get_New_Row(ParentRow, T); int N = MetaData.MaxFromColumn(T, "idassetunload"); if (N < 9999000) { R["idassetunload"] = 9999001; } else { R["idassetunload"] = N + 1; } int NN = MetaData.MaxFromColumn(T, "nassetunload"); if (NN < 9999000) { R["nassetunload"] = 9999001; } else { R["nassetunload"] = NN + 1; } return(R); }
/// <summary> /// 输出数据 /// </summary> /// <param name="entrys">一个entry表示一个数据库变更</param> private static void PrintEntry(List <Entry> entrys) { foreach (var entry in entrys) { if (entry.EntryType == EntryType.Transactionbegin || entry.EntryType == EntryType.Transactionend) { continue; } RowChange rowChange = null; try { //获取行变更 rowChange = RowChange.Parser.ParseFrom(entry.StoreValue); } catch (Exception e) { //_logger.LogError(e.ToString()); Console.WriteLine(e.Message); } if (rowChange != null) { //变更类型 insert/update/delete 等等 EventType eventType = rowChange.EventType; //输出binlog信息 表名 数据库名 变更类型 //_logger.LogInformation( // $"================> binlog[{entry.Header.LogfileName}:{entry.Header.LogfileOffset}] , name[{entry.Header.SchemaName},{entry.Header.TableName}] , eventType :{eventType}"); Console.WriteLine($"================> binlog[{entry.Header.LogfileName}:{entry.Header.LogfileOffset}] , name[{entry.Header.SchemaName},{entry.Header.TableName}] , eventType :{eventType}"); //输出 insert/update/delete 变更类型列数据 foreach (var rowData in rowChange.RowDatas) { if (eventType == EventType.Delete) { PrintColumn(rowData.BeforeColumns.ToList()); } else if (eventType == EventType.Insert) { PrintColumn(rowData.AfterColumns.ToList()); } else { //_logger.LogInformation("-------> before"); Console.WriteLine("-------> before"); PrintColumn(rowData.BeforeColumns.ToList()); //_logger.LogInformation("-------> after"); Console.WriteLine("-------> after"); PrintColumn(rowData.AfterColumns.ToList()); } } } } }
void AllineaTabella(string table, string campoflag) { DataRow Main = DS.registry.Rows[0]; DataTable T = DS.Tables[table]; MetaData M = Dispatcher.Get(T.TableName); M.SetDefaults(T); foreach (DataRow R in T.Select()) { int curridreg = CfgFn.GetNoNullInt32(R["idreg"]); if (mainidreg == curridreg) { continue; } DataRow New = M.Get_New_Row(Main, T); foreach (DataColumn C in T.Columns) { if (RowChange.IsAutoIncrement(C)) { continue; } //non copiare idreg if (C.ColumnName == "idreg") { continue; } New[C.ColumnName] = R[C.ColumnName]; } } if (campoflag != null) { CorreggiFlag(T, campoflag); } PulisciRigheSpurie(T); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetMySelector(T.Columns["nauthpayment"], "yauthpayment", 0); RowChange.MarkAsAutoincrement(T.Columns["nauthpayment"], null, null, 0); RowChange.MarkAsAutoincrement(T.Columns["idauthpayment"], null, null, 0); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "yestim"); //string tiponumerazione = T.ExtendedProperties["tiponumerazione"].ToString(); /*if (tiponumerazione=="A") { * //string middleconst=GetSys("esercizio").ToString().Substring(2,2)+"/"; * RowChange.MarkAsAutoincrement(T.Columns["nestim"], null, null, 6); * SetDefault(T, "nestim", -10); * } * else { * int nmax = CfgFn.GetNoNullInt32( * Conn.DO_READ_VALUE("estimate", "(yestim="+ * QueryCreator.quotedstrvalue(GetSys("esercizio"),true)+")", "MAX(nestim)"))+1; * SetDefault(T,"nestim", nmax); * }*/ RowChange.SetSelector(T, "idestimkind"); DataRow R = base.Get_New_Row(ParentRow, T); /*int N = MetaData.MaxFromColumn(T, "nestim"); * if (tiponumerazione == "A") { * if (N < 99990000) * N = 99990000; * else * N = N + 1; * R["nestim"] = N; * }*/ return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.ClearMySelector(T, "ystoreunload"); RowChange.MarkAsAutoincrement(T.Columns["idstoreunload"], null, null, 0); RowChange.MarkAsAutoincrement(T.Columns["nstoreunload"], null, null, 0); RowChange.SetMySelector(T.Columns["nstoreunload"], "ystoreunload", 0); DataRow R = base.Get_New_Row(ParentRow, T); int N = MetaData.MaxFromColumn(T, "nstoreunload"); if (N < 9999000) { R["nstoreunload"] = 9999001; } else { R["nstoreunload"] = N + 1; } int K = MetaData.MaxFromColumn(T, "idstoreunload"); if (K < 9999000) { R["idstoreunload"] = 9999001; } else { R["idstoreunload"] = K + 1; } return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetMySelector(T.Columns["nepexp"], "nphase", 0); RowChange.SetMySelector(T.Columns["nepexp"], "yepexp", 0); RowChange.MarkAsAutoincrement(T.Columns["nepexp"], null, null, 0); RowChange.setMinimumTempValue(T.Columns["nepexp"], 99999000); RowChange.MarkAsAutoincrement(T.Columns["idepexp"], null, null, 0); RowChange.setMinimumTempValue(T.Columns["idepexp"], 99999000); DataRow R = base.Get_New_Row(ParentRow, T); //int N = MetaData.MaxFromColumn(T, "idepexp"); //if (N < 999900000) // N = 999900000; //else // N = N + 1; //R["idepexp"] = N; //N = MetaData.MaxFromColumn(T, "nepexp"); //if (N < 999900000) // N = 999900000; //else // N = N + 1; //R["nepexp"] = N; return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.MarkAsAutoincrement(T.Columns["nlevel"], null, null, 0); RowChange.SetSelector(T, "ayear"); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "yadmpay"); RowChange.SetSelector(T, "nadmpay"); RowChange.MarkAsAutoincrement(T.Columns["nincome"], null, null, 7); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.MarkAsAutoincrement(T.Columns["idshowcase"], null, null, 0); DataRow R = base.Get_New_Row(ParentRow, T); return(R); }
public override System.Data.DataRow Get_New_Row(System.Data.DataRow ParentRow, System.Data.DataTable T) { int flag = CfgFn.GetNoNullInt32(ParentRow["flag"]); bool ispieceacquire = ((flag & 4) != 0); if (!ispieceacquire) { RowChange.MarkAsAutoincrement(T.Columns["idasset"], null, null, 6); RowChange.ClearAutoIncrement(T.Columns["idpiece"]); RowChange.ClearSelector(T, "idasset"); SetDefault(T, "idpiece", 1); } else { RowChange.MarkAsAutoincrement(T.Columns["idpiece"], null, null, 6); RowChange.ClearAutoIncrement(T.Columns["idasset"]); RowChange.SetSelector(T, "idasset"); } DataRow R = base.Get_New_Row(ParentRow, T); if (ispieceacquire) { if (R["idpiece"].ToString() == "1") { R["idpiece"] = 2; } } return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "idreg"); RowChange.MarkAsAutoincrement(T.Columns["idregistrylegalstatus"], null, null, 0); RowChange.setMinimumTempValue(T.Columns["idregistrylegalstatus"], 9999); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "idreg"); RowChange.MarkAsAutoincrement(T.Columns["idregistrypiva"], null, null, 7); return(base.Get_New_Row(ParentRow, T)); }
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 Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "yentry"); RowChange.setMinimumTempValue(T.Columns["nentry"], 99990000); RowChange.MarkAsAutoincrement(T.Columns["nentry"], null, null, 9); return(base.Get_New_Row(ParentRow, T)); }
public override string InitClass(DataSet DS, DataAccess Conn) { if (DS.Tables["income"].Rows.Count == 0) { return(base.InitClass(DS, Conn)); } DataSet DSP = DS.Copy(); dsSource = DS; DS.ExtendedProperties["DSPData"] = DSP; foreach (DataTable T in DS.Tables) { RowChange.CopyAutoIncrementProperties(T, DSP.Tables[T.TableName]); } faseestimate = -1; if ((DS.Tables["incomeestimate"] != null) && (DS.Tables["incomeestimate"].ExtendedProperties["faseattivazione"] != null)) { faseestimate = CfgFn.GetNoNullInt32(DS.Tables["incomeestimate"].ExtendedProperties["faseattivazione"]); } //faseestimate = CfgFn.GetNoNullInt32(Conn.GetSys("estimatephase")); faseiva = CfgFn.GetNoNullInt32(Conn.GetSys("invoiceincomephase")); DSP.EnforceConstraints = false; //Aggiunge la relazione padre/figlio per la tabella spesa DSP.Relations.Add("incomeincome", DSP.Tables["income"].Columns["idinc"], DSP.Tables["income"].Columns["parentidinc"], false); SplitRowInPhases(DSP, Conn); return(base.InitClass(DSP, Conn)); }
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 override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "taxcode"); RowChange.SetSelector(T, "idexp"); RowChange.MarkAsAutoincrement(T.Columns["nbracket"], null, null, 7); return(base.Get_New_Row(ParentRow, T)); }
override public DataRow Get_New_Row(DataRow ParentRow, DataTable T) { DataTable Levels = T.DataSet.Tables["flowchartlevel"]; if (Levels == null) { return(null); } int level; string codprefix; string ordinestampaprefix; if (ParentRow != null) { level = Convert.ToInt32(ParentRow["nlevel"]) + 1; codprefix = ParentRow["codeflowchart"].ToString(); ordinestampaprefix = ParentRow["printingorder"].ToString(); } else { level = 1; codprefix = ""; ordinestampaprefix = ""; SetDefault(T, "paridflowchart", GetSys("esercizio").ToString().Substring(2, 2)); } if (level > (Levels.Rows.Count - 1)) { MessageBox.Show("Non è possibile inserire un livello inferiore a quello selezionato"); return(null); } string kind = "A"; //corresponding to "flagreset" DataRow[] levrow = Levels.Select("(nlevel=" + QueryCreator.quotedstrvalue(level, false) + ") AND " + "(ayear=" + QueryCreator.quotedstrvalue(esercizio, false) + ")"); if (levrow.Length != 1) { return(null); } SetDefault(T, "nlevel", level); RowChange.MarkAsAutoincrement(T.Columns["idflowchart"], "paridflowchart", null, 4); if (kind.ToLower() == "a") { SetDefault(T, "codeflowchart", codprefix); SetDefault(T, "printingorder", ordinestampaprefix); } DataRow R = base.Get_New_Row(ParentRow, T); if (kind.ToLower() == "a") { RowChange.ClearAutoIncrement(T.Columns["printingorder"]); } return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "taxcode"); RowChange.SetSelector(T, "idcity"); RowChange.MarkAsAutoincrement(T.Columns["idtaxrateregioncitystart"], null, null, 7); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { SetAutoIncrementProperties(T, Conn); RowChange.SetSelector(T, "yservreg"); RowChange.MarkAsAutoincrement(T.Columns["nservreg"], null, null, 7); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "idassetvar"); RowChange.MarkAsAutoincrement(T.Columns["idassetvardetail"], null, null, 7); DataRow R = base.Get_New_Row(ParentRow, T); return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "ytaxpay"); RowChange.MarkAsAutoincrement(T.Columns["ntaxpay"], null, null, 6); DataRow R = base.Get_New_Row(ParentRow, T); return(R); }
override public DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "idprovision"); RowChange.MarkAsAutoincrement(T.Columns["rownum"], null, null, 6); DataRow R = base.Get_New_Row(ParentRow, T); return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "idcity"); RowChange.SetSelector(T, "idagency"); RowChange.SetSelector(T, "idcode"); RowChange.MarkAsAutoincrement(T.Columns["version"], null, null, 7); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "iditineration"); RowChange.MarkAsAutoincrement(T.Columns["lapnumber"], null, null, 6); DataRow R = base.Get_New_Row(ParentRow, T); return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.MarkAsAutoincrement(T.Columns["idinvkind"], null, null, 7); RowChange.setMinimumTempValue(T.Columns["idinvkind"], 9999000); DataRow R = base.Get_New_Row(ParentRow, T); return(R); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { RowChange.SetSelector(T, "ycon"); RowChange.SetSelector(T, "ncon"); RowChange.MarkAsAutoincrement(T.Columns["iddetail"], null, null, 6); return(base.Get_New_Row(ParentRow, T)); }
public override DataRow Get_New_Row(DataRow ParentRow, DataTable T) { //RowChange.SetSelector(T, "idflowchart"); RowChange.SetSelector(T, "idcustomuser"); RowChange.setMinimumTempValue(T.Columns["ndetail"], 999000); RowChange.MarkAsAutoincrement(T.Columns["ndetail"], null, null, 0); return(base.Get_New_Row(ParentRow, T)); }
protected virtual void OnReceipt(Subscription subscription, RowChange data, Exception error) { if (Receipt!=null) Receipt(subscription, this, data, error); }
/// <summary> /// Delivers data to the mailbox. This method is called by subscription /// </summary> public bool Deliver(Subscription subscription, RowChange data) { if (subscription.Store!=this.Store) return false; var cap = m_BufferCapacity; if (cap>0) lock(m_Buffer) { m_Buffer.AddLast(data); if (m_Buffer.Count>cap) m_Buffer.RemoveFirst(); } OnReceipt(subscription, data, null); return true; }