Exemplo n.º 1
0
        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);
        }
        private static void AddParms(ref DBAccess db, CampaignCompany rec)
        {
            var with_1 = rec;

            db.AddInt("CompanyID", with_1.CompanyID);
            db.AddInt("CampaignID", with_1.CampaignID);
            db.AddInt("Status", (System.Int32)with_1.Status);

            db.AddGuid("ResponsibleID", with_1.ResponsibleID);
            db.AddNVarChar("ResponsibleName", with_1.ResponsibleName, 50);
            db.AddNVarChar("ResponsibleEmail", with_1.ResponsibleEmail, 255);

            db.AddNVarChar("ContactPerson", with_1.ContactPerson, 50);
            db.AddBoolean("ContactedByPhone", with_1.ContactedByPhone);

            db.AddBoolean("MeetingHeld", with_1.MeetingHeld);
            db.AddBoolean("CampaignSale", with_1.CampaignSale);
            db.AddMoney("CampaignSaleAmount", (double)with_1.CampaignSaleAmount);
            db.AddBoolean("ExpectedSale", with_1.ExpectedSale);
            db.AddMoney("ExpectedSaleAmount", (double)with_1.ExpectedSaleAmount);

            db.AddNVarChar("Notes", with_1.Notes, -1);

            AddParmsStandard(db, rec);
        }
        public static bool ChangeUserName(string ApplicationName, string oldUserName, string newUserName)
        {
            bool IsSuccsessful = false;

            if (IsUserNameValid(newUserName))
            {
                DBAccess db = new DBAccess(MembershipConnectionString);
                // db.Connection.Close()
                //db.ConnectionString = MembershipConnectionString 'ConfigurationManager.ConnectionStrings("MembershipConnectionString").ConnectionString
                //db.Connection.Open()

                db.AddNVarChar("ApplicationName", ApplicationName, 256);
                db.AddNVarChar("OldUserName", oldUserName, 256);
                db.AddNVarChar("NewUserName", newUserName, 256);

                try
                {
                    int retval = db.ExecuteNonQuery("dbo.sproc_ChangeUserName");
                    IsSuccsessful = true;
                }
                catch (Exception)
                {
                    IsSuccsessful = false;
                }
            }
            else
            {
                IsSuccsessful = false;
            }

            return(IsSuccsessful);
        }
        //Protected Sub AddLog(ByVal Status As String, ByVal Logtext As String, Optional ByVal logtype As LogTypeEnum = LogTypeEnum.Normal)
        //    Log.AddLog(Status, Logtext, logtype)
        //End Sub

        #endregion

        #region  Standard Populate

        protected static object AddParmsStandard(DBAccess db, BaseObject rec)
        {
            db.AddNVarChar("RettetAf", rec.CurUser, 50);
            db.AddNVarChar("RettetIP", rec.CurIP, 15);

            return(rec);
        }
Exemplo n.º 5
0
        private static void AddParms(ref DBAccess db, Invoiceline c)
        {
            var with_1 = c;

            db.AddInt("InvoiceID", with_1.InvoiceID);
            db.AddInt("Pos", with_1.Pos);
            db.AddInt("Status", (System.Int32)with_1.Status);

            db.AddInt("ItemID", with_1.ItemID);
            db.AddNVarChar("ItemNo", with_1.ItemNo, 50);
            db.AddNVarChar("ItemName", with_1.ItemName, 100);

            db.AddNVarChar("LineText", with_1.LineText, 250);
            db.AddNVarChar("SerialNo", with_1.SerialNo, 250);

            db.AddDecimal("ItemPrice", with_1.ItemPrice);
            db.AddDecimal("Discount", with_1.Discount);
            db.AddDecimal("SalesPrice", with_1.SalesPrice);
            db.AddDecimal("Quantity", with_1.Quantity);
            db.AddDecimal("LineTotal", with_1.LineTotal);

            db.AddBoolean("VAT", with_1.VAT);
            db.AddDecimal("Freight", with_1.Freight);

            db.AddDecimal("ProvisionRate", with_1.ProvisionRate);
            db.AddDecimal("Provision", with_1.Provision);
            db.AddDecimal("LineProvision", with_1.LineProvision);

            AddParmsStandard(db, c);
        }
Exemplo n.º 6
0
        public static DataSet GetEyeWash_SearchAll(string Postnr, string SerialNo)
        {
            DataSet  ds     = new DataSet();
            DataSet  dsTemp = new DataSet();
            bool     flag   = false;
            DBAccess db     = new DBAccess();

            //Dim arr As String() = Search.Split(" "c)
            //For Each s As String In arr
            db.AddNVarChar("Postnr", Postnr, 50);
            db.AddNVarChar("SerialNo", SerialNo, 50);

            db.AddBoolean("IsAgent", AdgangsKontrol.IsAgent());
            db.AddGuid("AgentID", CurrentUserID);

            //	EXEC	@return_value = [vicjos1_sysadm].[Co2Db_EyeWash_Search]
            //			@SerialNo = ''
            //		,	@Postnr =   '3400'
            //		,	@IsAgent = 0
            //		,	@AgentID = null
            dsTemp = db.ExecuteDataSet(_SQLSearch);
            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);
        }
        public static int PageAccessDelete(string PageUrl, string ApplicationName)
        {
            DBAccess db = new DBAccess();

            db.AddNVarChar("ApplicationName", ApplicationName, 256);
            db.AddNVarChar("Page", PageUrl, 250);
            return(db.ExecuteNonQuery(_SQLDelete));
        }
Exemplo n.º 8
0
 private static void AddParms(ref DBAccess db, NewsGrp c)
 {
     var with_1 = c;
     db.AddInt("ParentID", with_1.ParentID);
     db.AddNVarChar("NewsGrpNr", with_1.NewsGrpNr, 50);
     db.AddNVarChar("NewsGrpTekst", with_1.NewsGrpTekst, 50);
     AddParmsStandard(db, c);
 }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
        //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);
        }
Exemplo n.º 11
0
        private static void AddParms(ref DBAccess db, Postnummer c)
        {
            var with_1 = c;

            db.AddNVarChar("Postnr", with_1.Postnr, 10);
            db.AddNVarChar("Bynavn", with_1.Bynavn, 50);
            db.AddNVarChar("Gade", with_1.Gade, 50);
            db.AddNVarChar("Firma", with_1.Firma, 50);
            db.AddInt("Land", with_1.LandID);
            db.AddBoolean("Provins", bool.Parse(with_1.Provins));
            AddParmsStandard(db, c);
        }
Exemplo n.º 12
0
        private static void AddParms(ref DBAccess db, LogLine c)
        {
            var with_1 = c;

            db.AddNVarChar("Status", with_1.Status, 50);
            db.AddNVarChar("Metode", with_1.Metode, 50);
            db.AddNVarChar("Cvrnr", with_1.Cvrnr, 50);
            db.AddNVarChar("LogText", with_1.LogText, -1);
            db.AddNVarChar("ClientInfo", with_1.ClientInfo, 1023);
            db.AddInt("LogType", (System.Int32)with_1.LogType);
            AddParmsStandard(db, c);
        }
Exemplo n.º 13
0
        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);
        }
Exemplo n.º 14
0
 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);
 }
Exemplo n.º 15
0
        public static void set_PageAccess(string PageUrl, string ApplicationName, string value)
        {
            DBAccess        db = new DBAccess();
            PageAccessClass p  = new PageAccessClass();

            db.AddNVarChar("ApplicationName", ApplicationName, 256);
            db.AddNVarChar("Page", PageUrl, 250);
            db.AddNVarChar("Access", value, 250);

            db.AddNVarChar("RettetAF", p.RettetAf, 50);
            db.AddNVarChar("RettetIP", p.RettetIP, 15);
            db.addGetInt("ID");

            db.ExecuteNonQuery(_SQLUpdate);
        }
Exemplo n.º 16
0
        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
        }
Exemplo n.º 18
0
        //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);
        }
Exemplo n.º 19
0
        public static DataSet Search_Currency(string Search)
        {
            DataSet  ds     = new DataSet();
            DataSet  dsTemp = new DataSet();
            bool     flag   = false;
            DBAccess db     = new DBAccess();

            string[] arr = Search.Split(' ');
            foreach (string s in arr)
            {
                db.AddNVarChar("Search", s, 50);

                dsTemp = db.ExecuteDataSet(_SQLSelectBySearch);
                db.Parameters.Clear();
                //If dsTemp.Tables.Count > 0 Then
                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;
                }
                //End If
            }
            return(ds);
        }
Exemplo n.º 20
0
        public static DataSet Search_News(string Search, NewsStatusEnum Status, int NewsGrpID)
        {
            DataSet  ds     = new DataSet();
            DataSet  dsTemp = new DataSet();
            bool     flag   = false;
            DBAccess db     = new DBAccess();

            string[] arr = Search.Split(' ');
            foreach (string s in arr)
            {
                db.AddNVarChar("Search", s, 250);
                db.AddInt("Status", System.Convert.ToInt32(Status));
                db.AddInt("NewsGrpID", NewsGrpID);

                dsTemp = db.ExecuteDataSet(_SQLSelectBySearch);
                db.Parameters.Clear();
                //If dsTemp.Tables.Count > 0 Then
                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;
                }
                //End If
            }
            return(ds);
        }
Exemplo n.º 21
0
        public static string UpdateClob(Dokumenter d)
        {
            DBAccess db = new DBAccess();

            db.AddInt("ID", d.ID);
            db.AddNVarChar("Clob", d.Clob, -1);
            return(System.Convert.ToString(db.ExecuteNonQuery(_SQLUpdateClob)));
        }
        private static void AddParms(ref DBAccess db, KursusPolicy c)
        {
            var with_1 = c;

            db.AddInt("CompanyID", with_1.CompanyID);
            db.AddInt("Status", (System.Int32)with_1.Status);

            db.AddNVarChar("FirstAidTitle", with_1.FirstAidTitle, 250);
            db.AddInt("FirstAidAftale", with_1.FirstAidAftale);
            db.AddInt("FirstAidLeverandor", with_1.FirstAidLeverandor);
            db.AddInt("FirstAidKursusType", with_1.FirstAidKursusType);
            db.AddInt("FirstAidAdminAftale", with_1.FirstAidAdminAftale);
            db.AddInt("FirstAidRepetition", with_1.FirstAidRepetition);
            db.AddNVarChar("FirstAidMedarbInfo", with_1.FirstAidMedarbInfo, 50);

            AddParmsStandard(db, c);
        }
Exemplo n.º 23
0
        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);
        }
Exemplo n.º 24
0
        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);
        }
Exemplo n.º 25
0
        //SELECT ID, KundeGrpNavn, status, sort, OprettetAf, OprettetDen, OprettetIP, RettetAf, RettetDen, RettetIP
        //FROM Co2Db_KundeGrp

        private static void AddParms(ref DBAccess db, KundeGrp c)
        {
            var with_1 = c;

            db.AddInt("Status", (System.Int32)with_1.Status);
            db.AddNVarChar("KundeGrpNavn", with_1.KundeGrpNavn, 50);
            db.AddInt("Sort", with_1.Sort);
            AddParmsStandard(db, c);
        }
        public static DataSet GetGetCampaignsByCampaignNo(string CampaignNo)
        {
            DBAccess db = new DBAccess();

            db.AddNVarChar("CampaignNo", CampaignNo, 50);
            DataSet ds = db.ExecuteDataSet(_SQLGetCampaignNo);

            return(ds);
        }
Exemplo n.º 27
0
        private static void AddParms(ref DBAccess db, Combobox c)
        {
            var with_1 = c;

            db.AddNVarChar("Field", with_1.Field, 100);
            db.AddNVarChar("Title", with_1.Title, 250);
            db.AddNVarChar("Value", with_1.Value, 250);
            db.AddNVarChar("Contents", with_1.Contents, -1);
            db.AddBoolean("Hidden", with_1.Hidden);
            db.AddBoolean("Valid", with_1.Valid);
            db.AddInt("Idx", with_1.Idx);
            db.AddNVarChar("ApplicationName", Roles.ApplicationName, 256);

            //db.AddDateTime("Dato", .Dato)
            //db.AddDecimal("Tal", .Tal)
            //db.AddInt("FieldType", .FieldType)

            AddParmsStandard(db, c);
        }
Exemplo n.º 28
0
        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);
        }
Exemplo n.º 29
0
        public static string get_PageAccess(string PageUrl, string ApplicationName)
        {
            string   res = "";
            DBAccess db  = new DBAccess();

            db.AddNVarChar("ApplicationName", ApplicationName, 256);
            db.AddNVarChar("Page", PageUrl, 250);

            //db.addGetString("Value")
            SqlParameter value = new SqlParameter("@Access", 0);

            value.Direction = ParameterDirection.Output;
            value.SqlDbType = SqlDbType.NVarChar;
            value.Size      = 250;
            db.AddParameter(value);

            db.ExecuteNonQuery(_SQLGetOut);

            res = Funktioner.ToDbString(value.Value);
            return(res.Trim());
        }
        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);
        }