public static void update_FakturPajaks_Id(Guid Id, Guid?FakturPajaks_Id) { VendorInvoice objOld = new VendorInvoice(Id); //generate log description string log = ""; log = ActivityLog.appendChange(log, objOld.FakturPajaks_No, new FakturPajak(FakturPajaks_Id).No, "Faktur Pajak: '{0}' to '{1}'"); if (string.IsNullOrEmpty(log)) { Util.displayMessageBoxError("No changes to record"); } else { SqlQueryResult result = DBConnection.query( false, DBConnection.ActiveSqlConnection, QueryTypes.ExecuteNonQuery, "VendorInvoices_update_FakturPajaks_Id", new SqlQueryParameter(COL_DB_Id, SqlDbType.UniqueIdentifier, Id), new SqlQueryParameter(COL_DB_FakturPajaks_Id, SqlDbType.UniqueIdentifier, FakturPajaks_Id) ); if (result.IsSuccessful) { ActivityLog.submit(Id, String.Format("Updated: {0}", log)); } } }
public static void update(Guid Id, DateTime Timestamp, string InvoiceNo, decimal Amount, int TOP, string Notes) { VendorInvoice objOld = new VendorInvoice(Id); //generate log description string log = ""; log = ActivityLog.appendChange(log, objOld.InvoiceNo, InvoiceNo, "Invoice No: '{0}' to '{1}'"); log = ActivityLog.appendChange(log, objOld.Timestamp, Timestamp, "Timestamp: '{0:dd/MM/yy}' to '{1:dd/MM/yy}'"); log = Util.appendChange(log, objOld.Amount, Amount, "Amount: '{0:N2}' to '{1:N2}'"); log = ActivityLog.appendChange(log, objOld.TOP, TOP, "TOP: '{0}' to '{1}'"); log = ActivityLog.appendChange(log, objOld.Notes, Notes, "Notes: '{0}' to '{1}'"); SqlQueryResult result = DBConnection.query( false, DBConnection.ActiveSqlConnection, QueryTypes.ExecuteNonQuery, "VendorInvoices_update", new SqlQueryParameter(COL_DB_Id, SqlDbType.UniqueIdentifier, Id), new SqlQueryParameter(COL_DB_Timestamp, SqlDbType.DateTime, Timestamp), new SqlQueryParameter(COL_DB_InvoiceNo, SqlDbType.VarChar, InvoiceNo), new SqlQueryParameter(COL_DB_TOP, SqlDbType.Int, TOP), new SqlQueryParameter(COL_DB_Amount, SqlDbType.Decimal, Amount), new SqlQueryParameter(COL_DB_Notes, SqlDbType.NVarChar, Util.wrapNullable(Notes)) ); if (result.IsSuccessful) { ActivityLog.submit(Id, String.Format("Updated: {0}", log)); } }
private void populateGridFPMasukan() { Util.setGridviewDataSource(gridFPMasukan, VendorInvoice.get_Reminder()); tpFPMasukan.Text = string.Format("Masukan: {0}", gridFPMasukan.Rows.Count); }