private static void PopulateDBwithInfositePages(DBAccess db, Infosites po) { var with_1 = po; db.AddBoolean("@Aktiv", with_1.Aktiv); db.AddInt("Site_FK", with_1.Site_FK); db.AddInt("Parent_ID", with_1.Parent_ID); // db.AddInt("Sort", .Sort) db.AddBoolean("@IncludeInMenu", with_1.IncludeInMenu); db.AddBoolean("@Forside", with_1.Forside); db.AddBoolean("@IsDisabled", with_1.IsDisabled); db.AddBoolean("@IsDeleted", with_1.IsDeleted); db.AddNVarChar("PageName", with_1.PageName, 50); db.AddNVarChar("PageTitle", with_1.PageTitle, 50); db.AddNVarChar("Description", with_1.Description, 250); db.AddNVarChar("Keywords", with_1.Keywords, 250); db.AddInt("Template_ID", with_1.Template_ID); db.AddInt("Category_ID", with_1.Category_ID); db.AddInt("LinkType_ID", with_1.LinkType_ID); db.AddNVarChar("LinkUrl", with_1.LinkUrl, 250); db.AddInt("LinkPage_ID", with_1.LinkPage_ID); db.AddNVarChar("LinkTarget", with_1.LinkTarget, 50); db.AddDateTime("OpenDate", with_1.OpenDate); db.AddDateTime("ExpireDate", with_1.ExpireDate); db.AddNVarChar("RettetAf", with_1.CurUser); db.AddNVarChar("RettetIP", with_1.CurIP); }
private static void AddParms(ref DBAccess db, Dokumenter d) { var with_1 = d; db.AddBit("Aktiv", with_1.Aktiv); db.AddDateTime("Dato", with_1.Dato); db.AddDateTime("ExpireDate", with_1.ExpireDate); db.AddNVarChar("Name", with_1.Name, 250); db.AddNVarChar("Mime", with_1.Mime, 100); db.AddNVarChar("Beskrivelse", with_1.Beskrivelse, -1); db.AddInt("Type", with_1.Type); db.AddInt("Category", with_1.Category); db.AddInt("Owner", with_1.Owner); db.AddInt("MedArbGrpID", with_1.MedArbGrpID); db.AddNVarChar("Filename", with_1.Filename, 250); db.AddNVarChar("Ext", with_1.Ext, 50); db.AddInt("Size", with_1.Size); db.AddInt("Width", with_1.Width); db.AddInt("Height", with_1.Height); db.AddNVarChar("UserID", with_1.UserID, 50); db.AddBlob("Blob", d.Blob); db.AddNVarChar("Clob", with_1.Clob, -1); AddParmsStandard(db, d); }
//UPDATE [vicjos1_Heart2Start].[vicjos1_sysadm].[Co2Db_HtmlPageContent] // SET [IsAktiv] = <IsAktiv, bit,> // ,[IsDeleted] = <IsDeleted, bit,> // ,[PageType] = <PageType, int,> // ,[LocalCultureID] = <LocalCultureID, int,> // ,[Alias] = <Alias, nvarchar(100),> // ,[Title] = <Title, nvarchar(100),> // ,[ShowTitle] = <ShowTitle, bit,> // ,[SubTitle] = <SubTitle, nvarchar(100),> // ,[Description] = <Description, nvarchar(250),> // ,[KeyWords] = <KeyWords, nvarchar(250),> // ,[Content] = <Content, nvarchar(max),> // ,[PublishDate] = <PublishDate, datetime,> // ,[ExpireDate] = <ExpireDate, datetime,> // ,[OprettetAF] = <OprettetAF, nvarchar(50),> // ,[OprettetDen] = <OprettetDen, datetime,> // ,[OprettetIP] = <OprettetIP, nvarchar(15),> // ,[RettetAF] = <RettetAF, nvarchar(50),> // ,[RettetDen] = <RettetDen, datetime,> // ,[RettetIP] = <RettetIP, nvarchar(15),> // WHERE <Search Conditions,,> private static void AddParms(ref DBAccess db, PageContent c) { var with_1 = c; db.AddInt("Status", (System.Int32)with_1.Status); db.AddBoolean("IsActiv", with_1.IsActive); db.AddInt("PageType", with_1.PageType); db.AddInt("LocalCultureID", with_1.LocalCultureID); db.AddNVarChar("Title", with_1.Title, 100); db.AddNVarChar("Alias", with_1.Alias, 100); db.AddBoolean("ShowTitle", with_1.ShowTitle); db.AddNVarChar("SubTitle", with_1.SubTitle, 100); db.AddNVarChar("Description", with_1.Description, 250); db.AddNVarChar("KeyWords", with_1.KeyWords, 250); db.AddNVarChar("Content", with_1.Content, -1); db.AddDateTime("PublishDate", with_1.PublishDate); db.AddDateTime("ExpiredDate", with_1.ExpiredDate); // AddParmsStandard(db, c); }
private static void AddParms(ref DBAccess db, IncassoSag i) { var with_1 = i; db.AddNVarChar("ContactEmail", with_1.ContactEmail, 250); db.AddNVarChar("ContactName", with_1.ContactName, 50); db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("CompanyID", with_1.CompanyID); db.AddInt("InvoiceID", with_1.InvoiceID); db.AddDateTime("IncassoDate", with_1.IncassoDate); db.AddNVarChar("Notes", with_1.Notes, -1); db.AddFloat("InvoiceTotal", with_1.InvoiceTotal); db.AddFloat("RenterOpgjortAfKreditor", with_1.RenterOpgjortAfKreditor); db.AddFloat("GebyrOpgjortAfKreditor", with_1.GebyrOpgjortAfKreditor); db.AddFloat("RenteTilskrevetFraPaymentDatetilDD", with_1.RenteTilskrevetFraPaymentDatetilDD); db.AddFloat("GebyrForDenneRykkerskrivelse", with_1.GebyrForDenneRykkerskrivelse); db.AddFloat("IncassoTotal", with_1.IncassoTotal); db.AddFloat("IncassoSalaer", with_1.IncassoSalaer); db.AddFloat("Oversendelsesgebyr", with_1.Oversendelsesgebyr); db.AddBoolean("Paid", with_1.Paid); db.AddDateTime("PaidDate", with_1.PaidDate); AddParmsStandard(db, i); }
//EXEC [vicjos1_sysadm].[Co2Db_Invoice_Stats] // @PeriodStart = '2000-01-01', // @PeriodEnd = '2011-01-01', // @CompanyID = null, // @ItemID = null, // @InvoicePaid = null, // @VareVareNr = null public static DataSet GetInvoiceStats(DateTime PeriodStart, DateTime PeriodEnd, int CompanyID = -2, int ItemID = -2, int InvoicePaid = -2, string VareVareNr = "-2") { DBAccess db = new DBAccess(); db.AddDateTime("PeriodStart", PeriodStart); db.AddDateTime("PeriodEnd", PeriodEnd); if (CompanyID != -2) { db.AddInt("CompanyID", CompanyID); } if (ItemID != -2) { db.AddInt("ItemID", ItemID); } if (InvoicePaid != -2) { db.AddInt("InvoicePaid", InvoicePaid); } if (VareVareNr != "-2") { db.AddNVarChar("VareVareNr", VareVareNr, 50); } DataSet ds = db.ExecuteDataSet(_SQLInvoiceStats); return(ds); }
private static void AddParms(ref DBAccess db, AED_Battery c) { var with_1 = c; db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("AED_FK", with_1.AED_FK); db.AddInt("BatteryType", with_1.BatteryType); db.AddDateTime("BatteryDeleveryDate", with_1.BatteryDeleveryDate); db.AddDateTime("BatteryExpireDate", with_1.BatteryExpireDate); db.AddDateTime("BatteryEmailSendt", with_1.BatteryEmailSendt); AddParmsStandard(db, c); }
private static void AddParms(ref DBAccess db, EyeWash_Bottle rec) { var with_1 = rec; db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("EYE_FK", with_1.EYE_FK); db.AddInt("BottleType", with_1.BottleType); db.AddDateTime("BottleDeleveryDate", with_1.BottleDeleveryDate); db.AddDateTime("BottleExpireDate", with_1.BottleExpireDate); db.AddDateTime("BottleEmailSendt", with_1.BottleEmailSendt); AddParmsStandard(db, rec); }
private static void AddParms(ref DBAccess db, tilbudHeader c) { db.AddInt("Status", (System.Int32)c.Status); db.AddInt("CompanyID", c.CompanyID); db.AddDateTime("Opretdato", c.Opretdato); db.AddDateTime("Udlobdato", c.Udlobdato); db.AddInt("AnsvarligID", c.AnsvarligID); db.AddGuid("AnsvarligGUID", c.AnsvarligGUID); db.AddNVarChar("KontaktEmail", c.KontaktEmail, 250); db.AddNVarChar("KontaktPerson", c.KontaktPerson, 50); db.AddNVarChar("Noter", c.Noter, -1); db.AddNVarChar("TilbudsTillaeg", c.TilbudsTillaeg, -1); db.AddDecimal("Transport", c.Transport); AddParmsStandard(db, c); }
private static void AddParms(ref DBAccess db, News c) { var with_1 = c; db.AddInt("NewsGrpID", with_1.NewsGrpID); db.AddInt("Status", (System.Int32)with_1.Status); db.AddNVarChar("Title", with_1.Title, 255); db.AddNVarChar("Teaser", with_1.Teaser, 1023); db.AddNVarChar("Body", with_1.Body, -1); db.AddNVarChar("LinkUrl", with_1.Title, 250); db.AddInt("LinkTarget", with_1.LinkTarget); db.AddDateTime("PublishDate", with_1.PublishDate); db.AddDateTime("ExpiredDate", with_1.ExpiredDate); AddParmsStandard(db, c); }
public static void LogUserActivity(Guid UserID, string action) { //Call the sproc_UpdateUsersCurrentActivity sproc DBAccess db = new DBAccess(MembershipConnectionString); db.AddGuid("UserID", UserID); db.AddNVarChar("action", action, 256); db.AddDateTime("ApplicationName", DateTime.UtcNow); try { int retval = db.ExecuteNonQuery("dbo.sproc_UpdateUsersCurrentActivity"); } catch (Exception) { } //Using myConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("MembershipConnectionString").ConnectionString) // Dim myCommand As New SqlCommand("dbo.sproc_UpdateUsersCurrentActivity", myConnection) // myCommand.CommandType = CommandType.StoredProcedure // myCommand.Parameters.AddWithValue("@UserId", UserId) // myCommand.Parameters.AddWithValue("@Action", action) // myCommand.Parameters.AddWithValue("@CurrentTimeUtc", DateTime.UtcNow) // 'Execute the sproc // myConnection.Open() // myCommand.ExecuteNonQuery() // myConnection.Close() //End Using }
private static void AddParms(ref DBAccess db, PurchaseOrder rec) { var with_1 = rec; db.AddInt("Status", (System.Int32)with_1.Status); db.AddNVarChar("OrderCreatedBy", with_1.OrderCreatedBy, 50); db.AddDateTime("PurchaseDate", with_1.PurchaseDate); db.AddInt("SupplierID", with_1.SupplierID); db.AddNVarChar("SupplierEmail", with_1.SupplierEmail, 250); db.AddNVarChar("PurchaseOrderEmailCopy", with_1.PurchaseOrderEmailCopy, 250); db.AddInt("PaymentID", with_1.PaymentID); db.AddInt("FreightID", with_1.FreightID); db.AddInt("CurrencyID", with_1.CurrencyID); db.AddMoney("FreightPrice", (double)with_1.FreightPrice); db.AddMoney("TotalPurchaseOrder", (double)with_1.TotalPurchaseOrder); db.AddNVarChar("ShipToEANno", with_1.ShipToEANno, 15); db.AddNVarChar("ShipToName", with_1.ShipToName, 100); db.AddNVarChar("ShipToAddress1", with_1.ShipToAddress1, 100); db.AddNVarChar("ShipToAddress2", with_1.ShipToAddress2, 100); db.AddNVarChar("ShipToZipCode", with_1.ShipToZipCode, 50); db.AddNVarChar("ShipToCity", with_1.ShipToCity, 50); db.AddNVarChar("ShipToState", with_1.ShipToState, 50); db.AddNVarChar("ShipToCountry", with_1.ShipToCountry, 50); db.AddNVarChar("ShipToAtt", with_1.ShipToAtt, 50); db.AddNVarChar("ShipToRef", with_1.ShipToRef, 50); AddParmsStandard(db, rec); }
private static void AddParms(ref DBAccess db, Campaign rec) { db.AddInt("Status", (System.Int32)rec.Status); db.AddBit("Active", rec.Active); db.AddNVarChar("CampaignNo", rec.CampaignNo, 50); db.AddNVarChar("Name", rec.Name, 255); db.AddNVarChar("Description", rec.Description); db.AddDateTime("StartDate", rec.StartDate); db.AddDateTime("EndDate", rec.EndDate); db.AddMoney("ExpectedImediateSale", (double)rec.ExpectedImediateSale); db.AddMoney("ExpectedFollowUpSale", (double)rec.ExpectedFollowUpSale); AddParmsStandard(db, rec); }
private static void AddParms(ref DBAccess db, AED_Service c) { var with_1 = c; db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("AED_FK", with_1.AED_FK); db.AddInt("ServiceType", with_1.ServiceType); db.AddBoolean("ServiceActive", with_1.ServiceActive); db.AddDateTime("ServiceDueDate", with_1.ServiceDueDate); db.AddDateTime("ServiceVisitedDate", with_1.ServiceVisitedDate); db.AddInt("ServiceConsultantID", with_1.ServiceConsultantID); db.AddNVarChar("ServiceConsultant", with_1.ServiceConsultant, 50); db.AddMoney("ServicePrice", with_1.ServicePrice); // AddParmsStandard(db, c); }
//EXEC @return_value = [vicjos1_sysadm].[Co2Db_Campaign_Search] // @SupplierID = -1, // @CampaignID = -1, // @Status = -1, // @StartDate = NULL, // @EndDate = NULL public static DataSet GetCampaignsSupplierDS(int SupplierID, Campaign_StatusEnum Status, int CampaignID, string StartDate, string EndDate) { DBAccess db = new DBAccess(); db.AddInt("SupplierID", SupplierID); db.AddInt("CampaignID", CampaignID); db.AddInt("Status", Convert.ToInt32(Status)); if (Information.IsDate(StartDate)) { db.AddDateTime("StartDate", (DateTime?)((object)StartDate)); } if (Information.IsDate(EndDate)) { db.AddDateTime("EndDate", (DateTime?)((object)EndDate)); } DataSet ds = db.ExecuteDataSet(_SQLSelectBySupplierSearch); return(ds); }
private static void AddParms(ref DBAccess db, KursusDag c) { var with_1 = c; db.AddInt("KursusPolicyID", with_1.KursusPolicyID); db.AddDateTime("KursusDato", with_1.KursusDato); db.AddBoolean("Repetionskursus", with_1.Repetionskursus); db.AddInt("Status", (System.Int32)with_1.Status); AddParmsStandard(db, c); }
private static void AddParms(ref DBAccess db, Currency c) { var with_1 = c; db.AddVarChar("CurrencyCode", with_1.CurrencyCode, 10); db.AddNVarChar("CurrencyDesc", with_1.CurrencyDesc, 50); db.AddDecimal("CurrencyRate", with_1.CurrencyRate); db.AddDateTime("CurrencyDate", with_1.CurrencyDate); db.AddNVarChar("CurrencySymbol", with_1.CurrencySymbol, 50); AddParmsStandard(db, c); }
private static void AddParms(ref DBAccess db, KursusDeltager c) { AddParmsStandard(db, c); var with_1 = c; db.AddInt("CompanyID", with_1.CompanyID); db.AddInt("Status", (System.Int32)with_1.Status); db.AddNVarChar("Fornavn", with_1.Fornavn, 50); db.AddNVarChar("Efternavn", with_1.Efternavn, 50); db.AddDateTime("Birthday", with_1.Birthday); db.AddNVarChar("Cprnr", with_1.Cprnr, 4); db.AddNVarChar("MedArbNr", with_1.MedArbNr, 15); db.AddNVarChar("Lokation", with_1.Lokation, 250); db.AddNVarChar("Stilling", with_1.Stilling, 100); db.AddNVarChar("Adresse", with_1.Adresse, 250); db.AddNVarChar("Postnr", with_1.Postnr, 50); db.AddNVarChar("Bynavn", with_1.Bynavn, 50); db.AddNVarChar("State", with_1.State, 50); db.AddInt("Land", with_1.LandekodeID); db.AddDateTime("FratradtDato", with_1.FratradtDato); }
private static void AddParms(ref DBAccess db, AED_Redning c) { var with_1 = c; db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("AED_FK", with_1.AED_FK); db.AddInt("CompanyID", with_1.CompanyID); db.AddInt("RedningType", with_1.RedningType); db.AddDateTime("RedningDate", with_1.RedningDate); db.AddNVarChar("RedningNote", with_1.RedningNote, -1); AddParmsStandard(db, c); }
//UPDATE [vicjos1_RescueTekniq].[vicjos1_sysadm].[Co2Db_Aiva] // SET [CompanyID] = <CompanyID, int,> // ,[Status] = <Status, int,> // ,[ModelID] = <ModelID, int,> // ,[SerialNo] = <SerialNo, nvarchar(50),> // ,[InvoiceID] = <InvoiceID, nvarchar(50),> // ,[SalesDate] = <SalesDate, datetime,> // ,[OprettetAf] = <OprettetAf, nvarchar(50),> // ,[OprettetDen] = <OprettetDen, datetime,> // ,[OprettetIP] = <OprettetIP, nvarchar(15),> // ,[RettetAf] = <RettetAf, nvarchar(50),> // ,[RettetDen] = <RettetDen, datetime,> // ,[RettetIP] = <RettetIP, nvarchar(50),> // WHERE <Search Conditions,,> //GO private static void AddParms(ref DBAccess db, Aiva c) { var with_1 = c; db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("CompanyID", with_1.CompanyID); db.AddInt("ModelID", with_1.ModelID); db.AddNVarChar("InvoiceID", with_1.InvoiceID, 50); db.AddNVarChar("SerialNo", with_1.SerialNo, 50); db.AddDateTime("SalesDate", with_1.SalesDate); AddParmsStandard(db, c); }
// SET [KundeGrpID] = <KundeGrpID, int,> // ,[VareID] = <VareID, int,> // ,[status] = <status, int,> // ,[Rabat] = <Rabat, float,> // ,[FragtGebyr] = <FragtGebyr, float,> // ,[Dato] = <Dato, datetime,> private static void AddParms(ref DBAccess db, KundeGrp_Pris c) { var with_1 = c; db.AddInt("KundeGrpID", with_1.KundeGrpID); db.AddInt("VareID", with_1.VareID); db.AddInt("Status", (System.Int32)with_1.Status); db.AddDecimal("Rabat", with_1.Rabat); db.AddDecimal("FragtGebyr", with_1.FragtGebyr); db.AddDateTime("Dato", with_1.Dato); db.AddDecimal("ProvisionRate", with_1.ProvisionRate); AddParmsStandard(db, c); }
private static void AddParms(ref DBAccess db, PurchaseOrderItem rec) { var with_1 = rec; db.AddInt("PurchaseOrderID", with_1.PurchaseOrderID); db.AddInt("Pos", with_1.Pos); db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("ItemID", with_1.ItemID); db.AddNVarChar("ItemName", with_1.ItemName, 100); db.AddNVarChar("SupplierItemID", with_1.SupplierItemID, 50); db.AddNVarChar("SupplierItemName", with_1.SupplierItemName, 250); db.AddDecimal("Quantity", with_1.Quantity); db.AddMoney("ItemPrice", (double)with_1.ItemPrice); db.AddMoney("LinePrice", (double)with_1.LinePrice); db.AddDateTime("ExpectedReceiptDate", with_1.ExpectedReceiptDate); db.AddDateTime("ReceiptDate", with_1.ReceiptDate); AddParmsStandard(db, rec); }
public static int SetPaid(int ID, DateTime PaidDate) { DBAccess db = new DBAccess(); InvoiceHeader c = new InvoiceHeader(ID); db.AddInt("ID", ID); db.AddInt("Status", System.Convert.ToInt32(Invoiceline_StatusEnum.Payed)); db.AddDateTime("PaidDate", PaidDate); AddParmsStandard(db, c); int retval = db.ExecuteNonQuery(_SQLSetPaid); AddLog(Status: "InvoiceHeader", Logtext: string.Format("SetPaid InvoiceHeader: ID:{0} Paid:{1} Status:{2}", c.ID, c.PaidDate, c.StatusText), Metode: "SetPaid"); return(retval); }
public static DataSet SelectAllExpired(int CompanyID, int Status, int ExpireTime, DateTime ExpireDate) { DBAccess db = new DBAccess(); db.AddInt("CompanyID", CompanyID); db.AddInt("Status", Status); db.AddInt("ExpireTime", ExpireTime); db.AddDateTime("ExpireDate", ExpireDate); db.AddBoolean("IsAgent", AdgangsKontrol.IsAgent()); db.AddGuid("AgentID", CurrentUserID); DataSet ds = db.ExecuteDataSet(_SQLSelectAllExpired); return(ds); }
private static void AddParms(ref DBAccess db, EyeWash rec) { var with_1 = rec; db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("CompanyID", with_1.CompanyID); db.AddInt("ModelID", with_1.ModelID); db.AddNVarChar("SerialNo", with_1.SerialNo, 50); db.AddNVarChar("FirmwareVersion", with_1.FirmwareVersion, 50); db.AddNVarChar("FirmwareLanguage", with_1._FirmwareLanguage, 50); db.AddDateTime("DeleveryDate", with_1.DeleveryDate); db.AddDateTime("WarencyExpireDate", with_1.WarencyExpireDate); db.AddDateTime("EmailSendt", with_1.EmailSendt); db.AddDateTime("BottleActivationDate", with_1.BottleActivationDate); db.AddDateTime("BottleWarencyExpireDate", with_1.BottleWarencyExpireDate); db.AddInt("BilagStatus", (System.Int32)with_1.BilagStatus); db.AddDateTime("BilagSendtDato", with_1.BilagSendtDato); db.AddDateTime("BilagModtagetDato", with_1.BilagModtagetDato); db.AddNVarChar("ResponsibleName", with_1.ResponsibleName, 50); db.AddNVarChar("ResponsiblePhone", with_1.ResponsiblePhone, 16); db.AddNVarChar("ResponsibleEmail", with_1.ResponsibleEmail, 250); db.AddNVarChar("LocationAdresse", with_1.LocationAdresse, 50); db.AddNVarChar("LocationPostnr", with_1.LocationPostnr, 16); db.AddNVarChar("LocationBy", with_1.LocationBy, 50); db.AddNVarChar("LocationState", with_1.LocationState, 50); db.AddInt("LocationLandID", with_1.LocationLandID); db.AddNVarChar("Location", with_1.Location, -1); db.AddNVarChar("LocationBuildingNo", with_1.LocationBuildingNo, 10); db.AddDateTime("RegisterretCSI", with_1.RegisterretCSI); db.AddNVarChar("RegisterretAF", with_1.RegisterretAF, 50); db.AddNVarChar("Note", with_1.Note, -1); AddParmsStandard(db, rec); }
private static object AddParms(DBAccess db, AED rec) { db.AddInt("Status", (System.Int32)rec.Status); db.AddInt("CompanyID", rec.CompanyID); db.AddInt("ModelID", rec.ModelID); db.AddNVarChar("SerialNo", rec.SerialNo, 50); db.AddNVarChar("FirmwareVersion", rec.FirmwareVersion, 50); db.AddNVarChar("FirmwareLanguage", rec._FirmwareLanguage, 50); db.AddDateTime("DeleveryDate", rec.DeleveryDate); db.AddDateTime("WarencyExpireDate", rec.WarencyExpireDate); db.AddDateTime("EmailSendt", rec.EmailSendt); db.AddDateTime("BatteryActivationDate", rec.BatteryActivationDate); db.AddDateTime("BatteryWarencyExpireDate", rec.BatteryWarencyExpireDate); db.AddInt("BilagStatus", (System.Int32)rec.BilagStatus); db.AddDateTime("BilagSendtDato", rec.BilagSendtDato); db.AddDateTime("BilagModtagetDato", rec.BilagModtagetDato); db.AddNVarChar("ResponsibleName", rec.ResponsibleName, 50); db.AddNVarChar("ResponsiblePhone", rec.ResponsiblePhone, 16); db.AddNVarChar("ResponsibleEmail", rec.ResponsibleEmail, 250); db.AddNVarChar("LocationAdresse", rec.LocationAdresse, 50); db.AddNVarChar("LocationPostnr", rec.LocationPostnr, 16); db.AddNVarChar("LocationBy", rec.LocationBy, 50); db.AddNVarChar("LocationState", rec.LocationState, 50); db.AddInt("LocationLandID", rec.LocationLandID); db.AddNVarChar("Location", rec.Location, -1); db.AddNVarChar("LocationBuildingNo", rec.LocationBuildingNo, 10); db.AddDateTime("RegisterretCSI", rec.RegisterretCSI); db.AddNVarChar("RegisterretAF", rec.RegisterretAF, 50); db.AddNVarChar("Note", rec.Note, -1); rec = (AED)(AddParmsStandard(db, rec)); return(rec); }
public static KursusDag GetKursusDag(int KursusPolicyID, DateTime KursusDato) { KursusDag c = new KursusDag(); DBAccess db = new DBAccess(); db.AddDateTime("KursusDato", KursusDato); db.AddInt("KursusPolicyID", KursusPolicyID); SqlDataReader dr = (SqlDataReader)(db.ExecuteReader(_SQLSelectByDate)); if (dr.HasRows) { while (dr.Read()) { Populate(dr, c); } dr.Close(); } return(c); }
private static void AddParms(ref DBAccess db, FAB c) { var with_1 = c; db.AddInt("Status", (System.Int32)with_1.Status); db.AddInt("CompanyID", with_1.CompanyID); db.AddInt("ModelID", with_1.ModelID); db.AddNVarChar("SerialNo", with_1.SerialNo, 50); db.AddDateTime("DeleveryDate", with_1.DeleveryDate); db.AddDateTime("WarencyExpireDate", with_1.WarencyExpireDate); db.AddDateTime("DecommissionDate", with_1.DecommissionDate); db.AddDateTime("EmailSendt", with_1.EmailSendt); db.AddInt("BilagStatus", (System.Int32)with_1.BilagStatus); db.AddDateTime("BilagSendtDato", with_1.BilagSendtDato); db.AddDateTime("BilagModtagetDato", with_1.BilagModtagetDato); db.AddNVarChar("ResponsibleName", with_1.ResponsibleName, 50); db.AddNVarChar("ResponsiblePhone", with_1.ResponsiblePhone, 16); db.AddNVarChar("ResponsibleEmail", with_1.ResponsibleEmail, 250); db.AddNVarChar("LocationAdresse", with_1.LocationAdresse, 50); db.AddNVarChar("LocationPostnr", with_1.LocationPostnr, 16); db.AddNVarChar("LocationBy", with_1.LocationBy, 50); db.AddNVarChar("LocationState", with_1.LocationState, 50); db.AddInt("LocationLandID", with_1.LocationLandID); db.AddNVarChar("Location", with_1.Location, -1); db.AddNVarChar("LocationBuildingNo", with_1.LocationBuildingNo, 10); db.AddInt("ServiceDate", with_1.ServiceDate); db.AddDateTime("ServiceDateEmail", with_1.ServiceDateEmail); db.AddBoolean("VisibleRescueinfo", with_1.VisibleRescueinfo); // db.AddNVarChar("RegisterretAF", with_1.RegisterretAF, 50); db.AddNVarChar("Note", with_1.Note, -1); AddParmsStandard(db, c); }
public static DataSet Search_KursusDag(int KursusPolicyID, DateTime KursusDato) { DataSet ds = new DataSet(); DataSet dsTemp = new DataSet(); bool flag = false; DBAccess db = new DBAccess(); db.AddDateTime("KursusDato", KursusDato); db.AddInt("KursusPolicyID", KursusPolicyID); dsTemp = db.ExecuteDataSet(_SQLSelectBySearch); db.Parameters.Clear(); ds.Merge(dsTemp); if (flag == false) { DataColumn[] pk = new DataColumn[2]; pk[0] = ds.Tables[0].Columns["ID"]; ds.Tables[0].PrimaryKey = pk; flag = true; } return(ds); }
private static void AddParms(ref DBAccess db, InvoiceHeader c) { db.AddInt("Status", (System.Int32)c.Status); db.AddInt("CompanyID", c.CompanyID); db.AddDateTime("InvoiceDate", c.InvoiceDate); db.AddInt("PaymentID", c.PaymentID); db.AddNVarChar("PaymentTerms", c.PaymentTerms, 50); db.AddDateTime("PaymentDate", c.PaymentDate); db.AddInt("ResponsibleID", c.ResponsibleID); db.AddNVarChar("ResponsibleName", c.ResponsibleName, 50); db.AddGuid("ResponsibleGUID", c.ResponsibleGUID); db.AddNVarChar("ContactName", c.ContactName, 50); db.AddNVarChar("ContactEmail", c.ContactEmail, 250); db.AddNVarChar("Notes", c.Notes, -1); db.AddNVarChar("InvoiceEANno", c.InvoiceEANno, 15); db.AddNVarChar("InvoiceName", c.InvoiceName, 100); db.AddNVarChar("InvoiceAddress1", c.InvoiceAddress1, 100); db.AddNVarChar("InvoiceAddress2", c.InvoiceAddress2, 100); db.AddNVarChar("InvoiceZipCode", c.InvoiceZipCode, 50); db.AddNVarChar("InvoiceCity", c.InvoiceCity, 50); db.AddNVarChar("InvoiceState", c.InvoiceState, 50); db.AddNVarChar("InvoiceCountry", c.InvoiceCountry, 50); db.AddNVarChar("InvoiceAtt", c.InvoiceAtt, 50); db.AddNVarChar("InvoiceRef", c.InvoiceRef, 50); db.AddNVarChar("DeleveryEANno", c.DeleveryEANno, 15); db.AddNVarChar("DeleveryName", c.DeleveryName, 100); db.AddNVarChar("DeleveryAddress1", c.DeleveryAddress1, 100); db.AddNVarChar("DeleveryAddress2", c.DeleveryAddress2, 100); db.AddNVarChar("DeleveryZipCode", c.DeleveryZipCode, 50); db.AddNVarChar("DeleveryCity", c.DeleveryCity, 50); db.AddNVarChar("DeleveryState", c.DeleveryState, 50); db.AddNVarChar("DeleveryCountry", c.DeleveryCountry, 50); db.AddNVarChar("DeleveryAtt", c.DeleveryAtt, 50); db.AddNVarChar("DeleveryRef", c.DeleveryRef, 50); db.AddInt("InvoiceLines", c.InvoiceLines); db.AddInt("InvoiceLineItems", c.InvoiceLineItems); db.AddDecimal("InvoiceLinesTotal", c.InvoiceLinesTotal); db.AddDecimal("InvoiceTransport", c.InvoiceTransport); db.AddDecimal("InvoiceTotal", c.InvoiceTotal); db.AddDecimal("InvoiceVAT", c.InvoiceVAT); db.AddDecimal("InvoiceTotalInclVAT", c.InvoiceTotalInclVAT); db.AddBit("Paid", c.Paid); db.AddDateTime("PaidDate", c.PaidDate); db.AddNVarChar("OrderNo", c.OrderNo, 50); db.AddNVarChar("YourRef", c.YourRef, 50); db.AddInt("CreditnoteID", c.CreditnoteID); db.AddBoolean("VATfree", c.VATfree); db.AddBoolean("EANInvoice", c.EANInvoice); db.AddInt("IncassoID", c.IncassoID); AddParmsStandard(db, c); }