jbisono 51 Posting Pro in Training

First you create your class, within your class you put your properties and methods so a class for the student will look like this.

public class Student 
{
   private string studentId;
   public string StudentId
   {
      get { return studentId; }
      set { studentId = value; }
   }
   private string courseId;
   public string CourseId
   {
      get { return courseId; }
      set { courseId = value; }
   }
   public void Registration()
   {
      Console.WriteLine(this.studentId + " - " + this.courseId);
   }
}

and then and your main function you can instantiate an object student like this

Student student = new Student();
student.StudentId = "1";
student.CourseId = "2";
student.Registration();
ddanbe commented: Well explained +15
jbisono 51 Posting Pro in Training

Like Antenka said, maybe this is too complex for you for now, because everything is created at runtime, which that's why you don't see anything in the design view, but if you really want to continue to play around with this code, I add some lines to meet your request, so you might be able to fix it at your needs.
Add this code:
1) In the CreatingElements() Methods

//After this line int size = 48;
//Create Panel To Hold Descriptions
FlowLayoutPanel pnl = new FlowLayoutPanel();
pnl.Location = new Point(x + (size * 2), y + size);
pnl.Size = new Size(size * 10, size * 2);
pnl.BackColor = System.Drawing.Color.LightGray;
pnl.BorderStyle = BorderStyle.FixedSingle;
pnl.Name = "PanelDescription";
//Create Labels 
foreach (var property in typeof(ElementData).GetProperties())
{
   var attribute = property.GetCustomAttributes(typeof(DisplayNameAttribute), false)
         .Cast<DisplayNameAttribute>()
         .FirstOrDefault();
   if (attribute != null)
   {
      Label lbl = new Label();
      lbl.Name = property.Name;
      pnl.Controls.Add(lbl);
   }
}
//Add Panel To The Form
this.Controls.Add(pnl);

Then for the same method

//after this line: elebuttons[el.SequenceNumber - 1].Click += new EventHandler(ButtonElements_Click);
elebuttons[el.SequenceNumber - 1].Name = el.SequenceNumber.ToString(); //This is to better retrieve the element later
elebuttons[el.SequenceNumber - 1].MouseHover += new EventHandler(Button_MouseHover); //adding the mouse over event at runtime
elebuttons[el.SequenceNumber - 1].MouseLeave += new EventHandler(Button_MouseLeave); //adding the mouse leave event at runtime

Now lets create the Event Handler for the mouse over and leave

void Button_MouseLeave(object sender, EventArgs e)
{
   //Code when mouse leave
}
void Button_MouseHover(object sender, EventArgs e)
{
   //Creating an instance of the button that was hover
   Button btn …
Antenka commented: Clean and nice .. but I guess it's just adding more confusion for an OP *giggle* +7
jbisono 51 Posting Pro in Training

First that is happening because you are not linking your two tables with a particular field, if that is what you want I would say SELECT TOP 1 THE REST OF THE CODE HERE.

But this is what I think you need and the FROM Clause Remove everything and add this
PTable AS T1 INNER JOIN
MTable AS T2 ON T1.idNumber = T2.mNumber

I'm assuming that idNumber and mNumber is the same ID. that should work.

jbisono 51 Posting Pro in Training

Ok i wanted to make sure we are in the same page :).

i did something similar but with the customer order process, anyway what about if you create another table with the Purchase_order, Line_No or Part_No (dont know how your table are set up) but basically for each purchase order -> part No you can have multiple serial No. then you will be able to enter as many serial no as you order qty.

this is how you can make it easier for the person who is entering the data, if you order 10 pieces and the manufacturer give this no as serial no sn100-001 after the dash is an incremental No. up to qty order then you can do some programming to generate 10 serial No. because is not funny have a order qty of 100 parts and entering that manually you have to find a convention how you can generate those serials no.

I have seen people using an excel sheet also to import that to the tables.

debasisdas commented: good suggestion. +9
jbisono 51 Posting Pro in Training

Maybe because you have two namespace that contains the same class name on it

using System.Net.Mail;
using System.Web.Mail;

I would try first taking out the second one because that one is obsolete, and give that a try.

jbisono 51 Posting Pro in Training

Try to calculate that at the database level, and return the total with your result. your statement should looks like

SELECT NAME, SCORE1, SCORE2, SCORE3, SCORE1 + SCORE2 + SCORE3 AS TOTAL
FROM YOURTABLE
Lusiphur commented: Excellent Recommendation :) +1
jbisono 51 Posting Pro in Training

well men i do not want make you feel bad either, i know is not easy at the beginning thats why we have to read a lot. and maybe linq is not the best option to start but with reading a little bit, i bet you anyone can get somereal work done, and almost all the tutorial explain everything where thins comes from. anyway here some links that can help you.

http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx
http://www.hookedonlinq.com/LINQtoSQL5MinuteOverview.ashx
http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx

the northwind database you can download it from microsoft website.

nick.crane commented: Nice LINQ links, thanks +1
jbisono 51 Posting Pro in Training

My opinion is, first HTML is not a programming language, is a MARKUP, TECHNOLOGY what ever you want it to call it, but not a programming language.

About math, i would say that all depends on what you are programming, but indeed you can do a lot of work with just the basic math functions.

jbisono 51 Posting Pro in Training

look i can give you a loop for that right now, but let me ask you this, why if you want to retrieve all the record where the level goes from 1 to 8, why dont you say and your stored procedure "where level between 1 and 8" and that case you make just one request to the server and get all the record you need.

fadi-ft commented: good man +1
jbisono 51 Posting Pro in Training

how you say, massive web sites like this one or others, requires massive period of time, and this time share by a group of people from different are of expertise that share knowledge to come up with a great and massive sites. what i can tell you right now is, that you are in the right track, if you know html(Read about xhtml also), css and you getting into asp.net. also learn javascript, ajax and xml, and any server side language like asp.net, php, ruby, jsp and so on.

those tools will make you strong to think big and come up with massive web sites.

jbisono 51 Posting Pro in Training

cblTest = CheckBoxList control

List<string> AllModules = new List<string>() 
        { 
            "Module1", "Module2", "Module3", "Module4", "Module5", "Module6"
        };
        cblTest.DataSource = AllModules;
        cblTest.DataBind();
        string ModuleIds = "Module2,Module5";
        string[] arrayModule = ModuleIds.Split(',');
        foreach (string st in arrayModule)
        {
            cblTest.Items.FindByText(st).Selected = true;
        }

the above example works great, if you know that every single module in arrayModule exist in the checkboxlist item collection.

jbisono 51 Posting Pro in Training

If you want to create a trigger in the update event do this.

create trigger money_from_vault
on table1
after update
as
DECLARE @Money Int
DECLARE @AccountID varchar(10)
SET @Money = (Select Money from Inserted)
SET @AccoundID = (Select AccountId from Inserted)
IF @Money != 0
BEGIN
UPDATE table2 SET Money=Money+@Money WHERE AccountID=@AccountID
END

I think that should do it.

jbisono 51 Posting Pro in Training

Uhmmm, Thats wierd in my case it always pick it up automatically anyway, if you pay an external hosting you should contact their support, in the other hand if you are managing your own server then you have to find something to make a default content, for example in IIS its called Enable Default Content Page.

jbisono 51 Posting Pro in Training

I do not know if this can help you, but if you have a date field which you can order by desc, then you can use Top 1 something like this.

Select top 1 Field1
from table1
order by datefield desc

if you dont have a date maybe have a index field that is the easiest way to do that.
regards

jbisono 51 Posting Pro in Training

I use querystring to retrieve parameters send from another form, let's say that you are and index.html and there is a link url to default.aspx like this
~/Default.aspx?var=hello

then and the Server code from Default.aspx to retrieve that value i have this.

string stTest = Request.QueryString["var"];

now stTest is equal to "hello"
hope that help you

sknake commented: good explanation +9
serkan sendur commented: if sknake thinks it is worth it, it is worth it +7
jbisono 51 Posting Pro in Training

Why dont you include the parameters in the select statement something like

string st = "select user, pass from loggin where user = '"+txtbox1.text+"' and pass = '"+txtbox2.text+"'";
//Then pass that select to the command object
rdr=cmd.executereader();
if(rdr.HasRows)
{
   msg(" successfully loggedin");
}

Take care.

jbisono 51 Posting Pro in Training

Hi, check this thread could be helpful for you

http://www.daniweb.com/forums/thread204828.html

dpreznik commented: Thank you +1
jbisono 51 Posting Pro in Training

Lets say that in the loadmain you set text for a label like this
Label1.Text = "Load Main"
But you want to do the same thing if you click a button, then create a function called for example

private void SetLabel()
{
Label1.Text = "Load Main"
}

then your load main will have this

private void LoadMain()
{
SetLabel()
}

and the button event

private void buttonevent()
{
SetLabel()
}

I hope you understand the idea. regards

jbisono 51 Posting Pro in Training

SELECT country_code, countries
FROM countries
WHERE (country_code NOT IN
(SELECT CountryCode
FROM allow))

ok so your statement should be like this.
regards.