private static void Populate(System.Data.SqlClient.SqlDataReader dr, Vare rec) { var with_1 = rec; with_1.VareGrpID = System.Convert.ToInt32(dr.DBtoInt("VareGrpID")); with_1.VareNr = dr.DBtoString("VareNr"); with_1.Navn = dr.DBtoString("Navn"); with_1.Beskrivelse = dr.DBtoString("Beskrivelse"); with_1._CurrencyID = System.Convert.ToInt32(dr.DBtoInt("CurrencyID")); with_1._CurrencyRate = System.Convert.ToDecimal(dr.DBtoDecimal("CurrencyRate")); with_1._Indkobspris = System.Convert.ToDecimal(dr.DBtoDecimal("Indkobspris")); with_1._FragtPct = System.Convert.ToDecimal(dr.DBtoDecimal("FragtPct")); with_1._Fragt = System.Convert.ToDecimal(dr.DBtoDecimal("Fragt")); with_1._KostprisCurrency = System.Convert.ToDecimal(dr.DBtoDecimal("KostprisCurrency")); with_1._KostprisDKK = System.Convert.ToDecimal(dr.DBtoDecimal("KostprisDKK")); with_1._DaekningsBidrag = System.Convert.ToDecimal(dr.DBtoDecimal("DaekningsBidrag")); with_1._DaekningsGrad = System.Convert.ToDecimal(dr.DBtoDecimal("DaekningsGrad")); with_1._SalgsPris = System.Convert.ToDecimal(dr.DBtoDecimal("SalgsPris")); with_1.Status = (RescueTekniq.BOL.VareStatusEnum)(dr.DBtoInt("Status")); with_1.FragtID = System.Convert.ToInt32(dr.DBtoInt("FragtID")); with_1.FaktaArkPath = dr.DBtoString("FaktaArkPath"); with_1.SupplierItemNo = dr.DBtoString("SupplierItemNo"); with_1.SupplierItemName = dr.DBtoString("SupplierItemName"); PopulateStandard(dr, rec); }
private static void Populate(System.Data.SqlClient.SqlDataReader dr, KursusDag c) { var with_1 = c; with_1.KursusPolicyID = System.Convert.ToInt32(dr.DBtoInt("KursusPolicyID")); with_1.KursusDato = System.Convert.ToDateTime(dr.DBtoDate("KursusDato")); with_1.Repetionskursus = System.Convert.ToBoolean(dr.DBtoBool("Repetionskursus")); with_1.Status = (RescueTekniq.BOL.KursusStatusEnum)(dr.DBtoInt("Status")); PopulateStandard(dr, c); }
private static void PopulateInfositePages(System.Data.SqlClient.SqlDataReader dr, Infosites isp) { var with_1 = isp; with_1.ID = System.Convert.ToInt32(dr.DBtoInt("ID")); with_1.Aktiv = System.Convert.ToBoolean(dr.DBtoInt("Aktiv")); with_1.Site_FK = System.Convert.ToInt32(dr.DBtoInt("Site_FK")); with_1.Parent_ID = System.Convert.ToInt32(dr.DBtoInt("Parent_ID")); with_1.Sort = System.Convert.ToInt32(dr.DBtoInt("Sort")); with_1.IncludeInMenu = System.Convert.ToBoolean(dr.DBtoBool("IncludeInMenu")); with_1.IsDeleted = System.Convert.ToBoolean(dr.DBtoBool("IsDeleted")); with_1.IsDisabled = System.Convert.ToBoolean(dr.DBtoBool("IsDisabled")); with_1.Forside = System.Convert.ToBoolean(dr.DBtoBool("Forside")); with_1.PageName = dr.DBtoString("PageName"); with_1.PageTitle = dr.DBtoString("PageTitle"); with_1.Description = dr.DBtoString("Description"); with_1.Keywords = dr.DBtoString("Keywords"); with_1.Template_ID = System.Convert.ToInt32(dr.DBtoInt("Template_ID")); with_1.Category_ID = System.Convert.ToInt32(dr.DBtoInt("Category_ID")); with_1.LinkType_ID = System.Convert.ToInt32(dr.DBtoInt("LinkType_ID")); with_1.LinkUrl = dr.DBtoString("LinkUrl"); with_1.LinkPage_ID = System.Convert.ToInt32(dr.DBtoInt("LinkPage_ID")); with_1.LinkTarget = dr.DBtoString("LinkTarget"); with_1.OpenDate = System.Convert.ToDateTime(dr.DBtoDate("OpenDate")); with_1.ExpireDate = System.Convert.ToDateTime(dr.DBtoDate("ExpireDate")); }
private static void Populate(System.Data.SqlClient.SqlDataReader dr, AED_Redning c) { var with_1 = c; with_1.Status = (RescueTekniq.BOL.AEDStatusEnum)(dr.DBtoInt("Status")); with_1.AED_FK = System.Convert.ToInt32(dr.DBtoInt("AED_FK")); with_1.CompanyID = System.Convert.ToInt32(dr.DBtoInt("CompanyID")); with_1.RedningType = System.Convert.ToInt32(dr.DBtoInt("RedningType")); with_1.RedningDate = System.Convert.ToDateTime(dr.DBtoDate("RedningDate")); with_1.RedningNote = dr.DBtoString("RedningNote"); PopulateStandard(dr, c); }
private static void Populate(System.Data.SqlClient.SqlDataReader dr, AED_Electrod c) { PopulateStandard(dr, c); var with_1 = c; with_1.Status = (RescueTekniq.BOL.AEDStatusEnum)(dr.DBtoInt("Status")); with_1.AED_FK = System.Convert.ToInt32(dr.DBtoInt("AED_FK")); with_1.ElectrodType = System.Convert.ToInt32(dr.DBtoInt("ElectrodType")); with_1.ElectrodDeleveryDate = System.Convert.ToDateTime(dr.DBtoDate("ElectrodDeleveryDate")); with_1.ElectrodExpireDate = System.Convert.ToDateTime(dr.DBtoDate("ElectrodExpireDate")); with_1.ElectrodEmailSendt = dr.DBtoDate("ElectrodEmailSendt"); }
public static System.Collections.Generic.List <FAB> GetListSoonExpired(int CompanyID) { System.Collections.Generic.List <FAB> result = new System.Collections.Generic.List <FAB>(); int ID = -1; DBAccess db = new DBAccess(); db.AddInt("CompanyID", CompanyID); db.AddBoolean("IsAgent", AdgangsKontrol.IsAgent()); db.AddGuid("AgentID", CurrentUserID); System.Data.SqlClient.SqlDataReader dr = default(System.Data.SqlClient.SqlDataReader); //Try dr = (System.Data.SqlClient.SqlDataReader)(db.ExecuteReader(_SQLSelectAllSoonExpired)); if (dr.HasRows) { while (dr.Read()) { ID = System.Convert.ToInt32(dr.DBtoInt("ID")); result.Add(FAB.GetFAB(ID)); } } dr.Close(); //Catch ex As Exception // Throw ex //End Try return(result); }
//Public Shared Function GetAllKursusDeltagerList() As DataSet // Dim db As DBAccess = New DBAccess // Dim ds As DataSet = db.ExecuteDataSet(_SQLSelectAllList) // Return ds //End Function public static System.Collections.Generic.List <KursusDeltager> GetAllKursusDeltagerDagList(int KursusDagID) { System.Collections.Generic.List <KursusDeltager> result = new System.Collections.Generic.List <KursusDeltager>(); int ID = -1; DBAccess db = new DBAccess(); db.AddInt("KursusDagID", KursusDagID); System.Data.SqlClient.SqlDataReader dr = default(System.Data.SqlClient.SqlDataReader); try { dr = (System.Data.SqlClient.SqlDataReader)(db.ExecuteReader(_SQLSelectIDAllDagList)); if (dr.HasRows) { while (dr.Read()) { ID = System.Convert.ToInt32(dr.DBtoInt("ID")); KursusDeltager kurist = KursusDeltager.GetKursusDeltager(ID); if (kurist != null && kurist.isLoaded) { result.Add(kurist); } } } dr.Close(); } catch (Exception ex) { throw (ex); } return(result); }
public static System.Collections.Generic.List <InvoiceHeader> GetInvoiceList(int CompanyID, Invoice_StatusEnum Status, int EANInvoice) { System.Collections.Generic.List <InvoiceHeader> result = new System.Collections.Generic.List <InvoiceHeader>(); DBAccess db = new DBAccess(); db.AddInt("CompanyID", CompanyID); db.AddInt("Status", System.Convert.ToInt32(Status)); db.AddInt("EANInvoice", EANInvoice); System.Data.SqlClient.SqlDataReader dr = default(System.Data.SqlClient.SqlDataReader); try { dr = (System.Data.SqlClient.SqlDataReader)(db.ExecuteReader(_SQLSelectByStatusCompany)); //_SQLSelectAll 'CType(db.ExecuteReader(_SQLSelectAllID), SqlDataReader) if (dr.HasRows) { while (dr.Read()) { result.Add(InvoiceHeader.GetInvoice(System.Convert.ToInt32(dr.DBtoInt("ID")))); } } dr.Close(); } catch (Exception ex) { throw (ex); } return(result); }
private static void Populate(System.Data.SqlClient.SqlDataReader dr, AED_Trainer c) { var with_1 = c; with_1.Status = (RescueTekniq.BOL.AEDStatusEnum)(dr.DBtoInt("Status")); //dr.DBtoInt("Status") with_1.CompanyID = System.Convert.ToInt32(dr.DBtoInt("CompanyID")); with_1.ModelID = System.Convert.ToInt32(dr.DBtoInt("ModelID")); with_1.SerialNo = dr.DBtoString("SerialNo"); with_1.FirmwareVersion = dr.DBtoString("FirmwareVersion"); with_1.FirmwareLanguage = dr.DBtoString("FirmwareLanguage"); with_1.DeleveryDate = System.Convert.ToDateTime(dr.DBtoDate("DeleveryDate")); with_1.WarencyExpireDate = System.Convert.ToDateTime(dr.DBtoDate("WarencyExpireDate")); with_1.BatteryActivationDate = System.Convert.ToDateTime(dr.DBtoDate("BatteryActivationDate")); with_1.BatteryWarencyExpireDate = System.Convert.ToDateTime(dr.DBtoDate("BatteryWarencyExpireDate")); with_1.BilagStatus = (RescueTekniq.BOL.AEDBilagStatus)(dr.DBtoInt("BilagStatus")); with_1.BilagSendtDato = System.Convert.ToDateTime(dr.DBtoDate("BilagSendtDato")); with_1.BilagModtagetDato = System.Convert.ToDateTime(dr.DBtoDate("BilagModtagetDato")); with_1.ResponsibleName = dr.DBtoString("ResponsibleName"); with_1.ResponsiblePhone = dr.DBtoString("ResponsiblePhone"); with_1.ResponsibleEmail = dr.DBtoString("ResponsibleEmail"); with_1.LocationAdresse = dr.DBtoString("LocationAdresse"); with_1.LocationPostnr = dr.DBtoString("LocationPostnr"); with_1.LocationBy = dr.DBtoString("LocationBy"); with_1.LocationState = dr.DBtoString("LocationState"); with_1.LocationLandID = System.Convert.ToInt32(dr.DBtoInt("LocationLandID")); with_1.Location = dr.DBtoString("Location"); with_1.RegisterretCSI = System.Convert.ToDateTime(dr.DBtoDate("RegisterretCSI")); with_1.RegisterretAF = dr.DBtoString("RegisterretAF"); with_1.Note = dr.DBtoString("Note"); PopulateStandard(dr, c); }
protected static void Populate(System.Data.SqlClient.SqlDataReader dr, PageContent c) { PopulateStandard(dr, c); var with_1 = c; with_1.Status = (RescueTekniq.BOL.PageContentStatusType)(dr.DBtoInt("Status")); with_1.IsActive = System.Convert.ToBoolean(dr.DBtoBoolean("IsActive")); with_1.PageType = System.Convert.ToInt32(dr.DBtoInt("PageType")); with_1.LocalCultureID = System.Convert.ToInt32(dr.DBtoInt("LocalCultureID")); with_1.Title = dr.DBtoString("Title"); with_1.Alias = dr.DBtoString("Alias"); with_1.ShowTitle = System.Convert.ToBoolean(dr.DBtoBoolean("ShowTitle")); with_1.SubTitle = dr.DBtoString("SubTitle"); with_1.Description = dr.DBtoString("Description"); with_1.KeyWords = dr.DBtoString("KeyWords"); with_1.Content = dr.DBtoString("Content"); with_1.PublishDate = System.Convert.ToDateTime(dr.DBtoDate("PublishDate")); with_1.ExpiredDate = System.Convert.ToDateTime(dr.DBtoDate("ExpiredDate")); }
private static void Populate(System.Data.SqlClient.SqlDataReader dr, FAB c) { var with_1 = c; with_1.Status = (RescueTekniq.BOL.FAB_StatusEnum)(dr.DBtoInt("Status")); with_1.CompanyID = System.Convert.ToInt32(dr.DBtoInt("CompanyID")); with_1.ModelID = System.Convert.ToInt32(dr.DBtoInt("ModelID")); with_1.SerialNo = dr.DBtoString("SerialNo"); with_1.DeleveryDate = System.Convert.ToDateTime(dr.DBtoDate("DeleveryDate")); with_1.WarencyExpireDate = System.Convert.ToDateTime(dr.DBtoDate("WarencyExpireDate")); with_1.DecommissionDate = System.Convert.ToDateTime(dr.DBtoDate("DecommissionDate")); with_1.EmailSendt = System.Convert.ToDateTime(dr.DBtoDate("EmailSendt")); with_1.BilagStatus = (RescueTekniq.BOL.FAB_BilagStatus)(dr.DBtoInt("BilagStatus")); with_1.BilagSendtDato = System.Convert.ToDateTime(dr.DBtoDate("BilagSendtDato")); with_1.BilagModtagetDato = System.Convert.ToDateTime(dr.DBtoDate("BilagModtagetDato")); with_1.ResponsibleName = dr.DBtoString("ResponsibleName"); with_1.ResponsiblePhone = dr.DBtoString("ResponsiblePhone"); with_1.ResponsibleEmail = dr.DBtoString("ResponsibleEmail"); with_1.LocationAdresse = dr.DBtoString("LocationAdresse"); with_1.LocationPostnr = dr.DBtoString("LocationPostnr"); with_1.LocationBy = dr.DBtoString("LocationBy"); with_1.LocationState = dr.DBtoString("LocationState"); with_1.LocationLandID = System.Convert.ToInt32(dr.DBtoInt("LocationLandID")); with_1.Location = dr.DBtoString("Location"); with_1.LocationBuildingNo = dr.DBtoString("LocationBuildingNo"); with_1.ServiceDate = System.Convert.ToInt32(dr.DBtoInt("ServiceDate")); with_1.ServiceDateEmail = System.Convert.ToDateTime(dr.DBtoDate("ServiceDateEmail")); with_1.VisibleRescueinfo = System.Convert.ToBoolean(dr.DBtoBoolean("VisibleRescueinfo")); with_1.RegisterretAF = dr.DBtoString("RegisterretAF"); with_1.Note = dr.DBtoString("Note"); PopulateStandard(dr, c); }
private static void Populate(System.Data.SqlClient.SqlDataReader dr, Invoiceline c) { var with_1 = c; with_1.InvoiceID = System.Convert.ToInt32(dr.DBtoInt("InvoiceID")); with_1.Pos = System.Convert.ToInt32(dr.DBtoInt("Pos")); with_1.Status = (RescueTekniq.BOL.Invoiceline_StatusEnum)(dr.DBtoInt("Status")); with_1.ItemID = System.Convert.ToInt32(dr.DBtoInt("ItemID")); with_1._ItemNo = dr.DBtoString("ItemNo"); with_1._ItemName = dr.DBtoString("ItemName"); with_1.LineText = dr.DBtoString("LineText"); with_1.SerialNo = dr.DBtoString("SerialNo"); with_1.ItemPrice = System.Convert.ToDecimal(dr.DBtoDecimal("ItemPrice")); with_1.Discount = System.Convert.ToDecimal(dr.DBtoDecimal("Discount")); with_1.SalesPrice = System.Convert.ToDecimal(dr.DBtoDecimal("SalesPrice")); with_1.Quantity = System.Convert.ToDecimal(dr.DBtoDecimal("Quantity")); with_1.LineTotal = System.Convert.ToDecimal(dr.DBtoDecimal("LineTotal")); with_1.VAT = System.Convert.ToBoolean(dr.DBtoBoolean("VAT")); with_1.Freight = System.Convert.ToDecimal(dr.DBtoDecimal("Freight")); with_1.Provision = System.Convert.ToDecimal(dr.DBtoDecimal("Provision")); with_1.ProvisionRate = System.Convert.ToDecimal(dr.DBtoDecimal("ProvisionRate")); with_1.LineProvision = System.Convert.ToDecimal(dr.DBtoDecimal("LineProvision")); with_1.CompanyID = System.Convert.ToInt32(dr.DBtoInt("CompanyID")); with_1.InvoiceDate = System.Convert.ToDateTime(dr.DBtoDateTime("InvoiceDate")); with_1.InvoiceStatus = (RescueTekniq.BOL.Invoice_StatusEnum)(dr.DBtoInt("InvoiceStatus")); with_1.InvoicePaid = System.Convert.ToBoolean(dr.DBtoBoolean("InvoicePaid")); with_1.InvoicePaidDate = System.Convert.ToDateTime(dr.DBtoDateTime("InvoicePaidDate")); PopulateStandard(dr, c); }