public override global::System.Data.DataSet Clone()
        {
            ProfileDS cln = ((ProfileDS)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            ProfileDS ds = new ProfileDS();

            global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
            global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
            global::System.Xml.Schema.XmlSchemaAny         any      = new global::System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
            if (xs.Contains(dsSchema.TargetNamespace))
            {
                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                try {
                    global::System.Xml.Schema.XmlSchema schema = null;
                    dsSchema.Write(s1);
                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                    {
                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                        s2.SetLength(0);
                        schema.Write(s2);
                        if ((s1.Length == s2.Length))
                        {
                            s1.Position = 0;
                            s2.Position = 0;
                            for (; ((s1.Position != s1.Length) &&
                                    (s1.ReadByte() == s2.ReadByte()));)
                            {
                                ;
                            }
                            if ((s1.Position == s1.Length))
                            {
                                return(type);
                            }
                        }
                    }
                }
                finally {
                    if ((s1 != null))
                    {
                        s1.Close();
                    }
                    if ((s2 != null))
                    {
                        s2.Close();
                    }
                }
            }
            xs.Add(dsSchema);
            return(type);
        }
Exemple #3
0
        public void LoadProfile(string Auser)
        {
            dbt = new DBtools(tdb.User.Uhelper, tdb.User.Udbcon);
            tdb.Season   sai  = new tdb.Season();
            tdb.Language lang = new tdb.Language();
            tdb.Customer pers = new tdb.Customer();
            ProfileDS    prof;
            string       sql;

            // load profile from DB by user name
            prof = new ProfileDS();
            sql  = String.Format("Select * from tdbadmin.mp_profil where mpuser like '{0}'", Auser);
            dbt.FillDS(prof, sql, new string[] { "mp_profil" });
            ProfileDS.mp_profilRow Rprof = prof.mp_profil[0];

            // set now the user profile data
            // Console.WriteLine("Prof Id {0}", Rprof.MPID);
            Useclevel = Rprof.SECLEVEL;
            Ulangid   = Rprof.S_ID;
            if (Ulangid > 0)
            {
                Ulang = lang.GetBez(Ulangid);
            }
            else
            {
                Ulang = "";
            }
            Uofficeid = Rprof.BCHST;
            if (Uofficeid > 0)
            {
                Uoffice = pers.GetBez(Uofficeid);
            }
            else
            {
                Ulang = "";
            }
            Udlatid = Rprof.DLAT_ID;
            Usaiid  = Rprof.SAI_ID;
            if (Usaiid > 0)
            {
                Usai = sai.GetBez(Usaiid);
            }
            else
            {
                Usai = "";
            }
        }
Exemple #4
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.objProfileDS = new tdb.DS.ProfileDS();
     this.btnLoad = new System.Windows.Forms.Button();
     this.btnUpdate = new System.Windows.Forms.Button();
     this.btnCancelAll = new System.Windows.Forms.Button();
     this.grdmp_profil = new System.Windows.Forms.DataGrid();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.groupBox2 = new System.Windows.Forms.GroupBox();
     ((System.ComponentModel.ISupportInitialize)(this.objProfileDS)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.grdmp_profil)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.SuspendLayout();
     //
     // objProfileDS
     //
     this.objProfileDS.DataSetName = "ProfileDS";
     this.objProfileDS.Locale = new System.Globalization.CultureInfo("en-US");
     //
     // btnLoad
     //
     this.btnLoad.Location = new System.Drawing.Point(8, 16);
     this.btnLoad.Name = "btnLoad";
     this.btnLoad.TabIndex = 0;
     this.btnLoad.Text = "&Load";
     this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
     //
     // btnUpdate
     //
     this.btnUpdate.Location = new System.Drawing.Point(112, 16);
     this.btnUpdate.Name = "btnUpdate";
     this.btnUpdate.TabIndex = 1;
     this.btnUpdate.Text = "&Update";
     this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
     //
     // btnCancelAll
     //
     this.btnCancelAll.Location = new System.Drawing.Point(224, 16);
     this.btnCancelAll.Name = "btnCancelAll";
     this.btnCancelAll.TabIndex = 2;
     this.btnCancelAll.Text = "Ca&ncel All";
     this.btnCancelAll.Click += new System.EventHandler(this.btnCancelAll_Click);
     //
     // grdmp_profil
     //
     this.grdmp_profil.AlternatingBackColor = System.Drawing.Color.LightGray;
     this.grdmp_profil.BackColor = System.Drawing.Color.Gainsboro;
     this.grdmp_profil.BackgroundColor = System.Drawing.Color.Silver;
     this.grdmp_profil.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.grdmp_profil.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
     this.grdmp_profil.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.grdmp_profil.CaptionForeColor = System.Drawing.Color.MidnightBlue;
     this.grdmp_profil.DataMember = "mp_profil";
     this.grdmp_profil.DataSource = this.objProfileDS;
     this.grdmp_profil.Dock = System.Windows.Forms.DockStyle.Fill;
     this.grdmp_profil.FlatMode = true;
     this.grdmp_profil.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.grdmp_profil.ForeColor = System.Drawing.Color.Black;
     this.grdmp_profil.GridLineColor = System.Drawing.Color.DimGray;
     this.grdmp_profil.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
     this.grdmp_profil.HeaderBackColor = System.Drawing.Color.MidnightBlue;
     this.grdmp_profil.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.grdmp_profil.HeaderForeColor = System.Drawing.Color.White;
     this.grdmp_profil.LinkColor = System.Drawing.Color.MidnightBlue;
     this.grdmp_profil.Location = new System.Drawing.Point(3, 16);
     this.grdmp_profil.Name = "grdmp_profil";
     this.grdmp_profil.ParentRowsBackColor = System.Drawing.Color.DarkGray;
     this.grdmp_profil.ParentRowsForeColor = System.Drawing.Color.Black;
     this.grdmp_profil.SelectionBackColor = System.Drawing.Color.CadetBlue;
     this.grdmp_profil.SelectionForeColor = System.Drawing.Color.White;
     this.grdmp_profil.Size = new System.Drawing.Size(402, 162);
     this.grdmp_profil.TabIndex = 3;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.btnLoad);
     this.groupBox1.Controls.Add(this.btnUpdate);
     this.groupBox1.Controls.Add(this.btnCancelAll);
     this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.groupBox1.Location = new System.Drawing.Point(0, 181);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(408, 48);
     this.groupBox1.TabIndex = 4;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "Actions";
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.grdmp_profil);
     this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
     this.groupBox2.Location = new System.Drawing.Point(0, 0);
     this.groupBox2.Name = "groupBox2";
     this.groupBox2.Size = new System.Drawing.Size(408, 181);
     this.groupBox2.TabIndex = 5;
     this.groupBox2.TabStop = false;
     this.groupBox2.Text = "User profiles";
     //
     // GUIuser
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.AutoScroll = true;
     this.ClientSize = new System.Drawing.Size(408, 229);
     this.Controls.Add(this.groupBox2);
     this.Controls.Add(this.groupBox1);
     this.Name = "GUIuser";
     this.Text = "User Profile";
     ((System.ComponentModel.ISupportInitialize)(this.objProfileDS)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.grdmp_profil)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.objProfileDS = new tdb.DS.ProfileDS();
     this.btnLoad      = new System.Windows.Forms.Button();
     this.btnUpdate    = new System.Windows.Forms.Button();
     this.btnCancelAll = new System.Windows.Forms.Button();
     this.grdmp_profil = new System.Windows.Forms.DataGrid();
     this.groupBox1    = new System.Windows.Forms.GroupBox();
     this.groupBox2    = new System.Windows.Forms.GroupBox();
     ((System.ComponentModel.ISupportInitialize)(this.objProfileDS)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.grdmp_profil)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.SuspendLayout();
     //
     // objProfileDS
     //
     this.objProfileDS.DataSetName = "ProfileDS";
     this.objProfileDS.Locale      = new System.Globalization.CultureInfo("en-US");
     //
     // btnLoad
     //
     this.btnLoad.Location = new System.Drawing.Point(8, 16);
     this.btnLoad.Name     = "btnLoad";
     this.btnLoad.TabIndex = 0;
     this.btnLoad.Text     = "&Load";
     this.btnLoad.Click   += new System.EventHandler(this.btnLoad_Click);
     //
     // btnUpdate
     //
     this.btnUpdate.Location = new System.Drawing.Point(112, 16);
     this.btnUpdate.Name     = "btnUpdate";
     this.btnUpdate.TabIndex = 1;
     this.btnUpdate.Text     = "&Update";
     this.btnUpdate.Click   += new System.EventHandler(this.btnUpdate_Click);
     //
     // btnCancelAll
     //
     this.btnCancelAll.Location = new System.Drawing.Point(224, 16);
     this.btnCancelAll.Name     = "btnCancelAll";
     this.btnCancelAll.TabIndex = 2;
     this.btnCancelAll.Text     = "Ca&ncel All";
     this.btnCancelAll.Click   += new System.EventHandler(this.btnCancelAll_Click);
     //
     // grdmp_profil
     //
     this.grdmp_profil.AlternatingBackColor = System.Drawing.Color.LightGray;
     this.grdmp_profil.BackColor            = System.Drawing.Color.Gainsboro;
     this.grdmp_profil.BackgroundColor      = System.Drawing.Color.Silver;
     this.grdmp_profil.BorderStyle          = System.Windows.Forms.BorderStyle.None;
     this.grdmp_profil.CaptionBackColor     = System.Drawing.Color.LightSteelBlue;
     this.grdmp_profil.CaptionFont          = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.grdmp_profil.CaptionForeColor     = System.Drawing.Color.MidnightBlue;
     this.grdmp_profil.DataMember           = "mp_profil";
     this.grdmp_profil.DataSource           = this.objProfileDS;
     this.grdmp_profil.Dock                = System.Windows.Forms.DockStyle.Fill;
     this.grdmp_profil.FlatMode            = true;
     this.grdmp_profil.Font                = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.grdmp_profil.ForeColor           = System.Drawing.Color.Black;
     this.grdmp_profil.GridLineColor       = System.Drawing.Color.DimGray;
     this.grdmp_profil.GridLineStyle       = System.Windows.Forms.DataGridLineStyle.None;
     this.grdmp_profil.HeaderBackColor     = System.Drawing.Color.MidnightBlue;
     this.grdmp_profil.HeaderFont          = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.grdmp_profil.HeaderForeColor     = System.Drawing.Color.White;
     this.grdmp_profil.LinkColor           = System.Drawing.Color.MidnightBlue;
     this.grdmp_profil.Location            = new System.Drawing.Point(3, 16);
     this.grdmp_profil.Name                = "grdmp_profil";
     this.grdmp_profil.ParentRowsBackColor = System.Drawing.Color.DarkGray;
     this.grdmp_profil.ParentRowsForeColor = System.Drawing.Color.Black;
     this.grdmp_profil.SelectionBackColor  = System.Drawing.Color.CadetBlue;
     this.grdmp_profil.SelectionForeColor  = System.Drawing.Color.White;
     this.grdmp_profil.Size                = new System.Drawing.Size(402, 162);
     this.grdmp_profil.TabIndex            = 3;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.btnLoad);
     this.groupBox1.Controls.Add(this.btnUpdate);
     this.groupBox1.Controls.Add(this.btnCancelAll);
     this.groupBox1.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.groupBox1.Location = new System.Drawing.Point(0, 181);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(408, 48);
     this.groupBox1.TabIndex = 4;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "Actions";
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.grdmp_profil);
     this.groupBox2.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.groupBox2.Location = new System.Drawing.Point(0, 0);
     this.groupBox2.Name     = "groupBox2";
     this.groupBox2.Size     = new System.Drawing.Size(408, 181);
     this.groupBox2.TabIndex = 5;
     this.groupBox2.TabStop  = false;
     this.groupBox2.Text     = "User profiles";
     //
     // GUIuser
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.AutoScroll        = true;
     this.ClientSize        = new System.Drawing.Size(408, 229);
     this.Controls.Add(this.groupBox2);
     this.Controls.Add(this.groupBox1);
     this.Name = "GUIuser";
     this.Text = "User Profile";
     ((System.ComponentModel.ISupportInitialize)(this.objProfileDS)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.grdmp_profil)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Exemple #6
0
        public void LoadProfile(string Auser)
        {
            dbt = new DBtools(tdb.User.Uhelper, tdb.User.Udbcon);
            tdb.Season sai = new tdb.Season();
            tdb.Language lang = new tdb.Language();
            tdb.Customer pers = new tdb.Customer();
            ProfileDS prof;
            string sql;

            // load profile from DB by user name
            prof = new ProfileDS();
            sql = String.Format("Select * from tdbadmin.mp_profil where mpuser like '{0}'", Auser);
            dbt.FillDS(prof, sql, new string[] { "mp_profil" });
            ProfileDS.mp_profilRow Rprof = prof.mp_profil[0];

            // set now the user profile data
            // Console.WriteLine("Prof Id {0}", Rprof.MPID);
            Useclevel = Rprof.SECLEVEL;
            Ulangid = Rprof.S_ID;
            if (Ulangid > 0)
                Ulang = lang.GetBez(Ulangid);
            else
                Ulang = "";
            Uofficeid = Rprof.BCHST;
            if (Uofficeid > 0)
                Uoffice = pers.GetBez(Uofficeid);
            else
                Ulang = "";
            Udlatid = Rprof.DLAT_ID;
            Usaiid = Rprof.SAI_ID;
            if (Usaiid > 0)
                Usai = sai.GetBez(Usaiid);
            else
                Usai = "";
        }
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs)
            {
                global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                ProfileDS ds = new ProfileDS();

                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "mp_profilDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace))
                {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                        {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length))
                            {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) &&
                                        (s1.ReadByte() == s2.ReadByte()));)
                                {
                                    ;
                                }
                                if ((s1.Position == s1.Length))
                                {
                                    return(type);
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null))
                        {
                            s1.Close();
                        }
                        if ((s2 != null))
                        {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return(type);
            }