public static void ProcessNumber(IDnumber myNum) 
      { 
          StringBuilder myData = new StringBuilder(); 
          myData.AppendLine(IDnumber.Name);    
          myData.AppendLine(": ");    
          myData.AppendLine(IDnumber.ID);    
          myData.AppendLine(IDnumber.year);    
          myData.AppendLine(IDnumber.class1);// i get it for all of these    
          myData.AppendLine(IDnumber.class2);    
          myData.AppendLine(IDnumber.class3);    
          myData.AppendLine(IDnumber.class4);   
          MessageBox.Show(myData); 
      } 
Beispiel #2
0
 public GetSchedule()     //here i get an error saying method must have a return type???
 {
     IDnumbers[0] = new IDnumber()
     {
         Name = "Joshua Banks", ID = "900456317", year = "Senior", class1 = "TEET 4090", class2 = "TEET 3020", class3 = "TEET 3090", class4 = "TEET 4290"
     };
     IDnumbers[1] = new IDnumber()
     {
         Name = "Sean Ward", ID = "900456318", year = "Junior", class1 = "ENGNR 4090", class2 = "ENGNR 3020", class3 = "ENGNR 3090", class4 = "ENGNR 4290"
     };
     IDnumbers[2] = new IDnumber()
     {
         Name = "Terrell Johnson", ID = "900456319", year = "Sophomore", class1 = "BUS 4090", class2 = "BUS 3020", class3 = "BUS 3090", class4 = "BUS 4290"
     };
 }
Beispiel #3
0
        protected bool IsRowModified(GridViewRow r)
        {
            int ID;
            //int SignupTotalid;
            string Name;
            string IDnumber;
            string Birthday;
            string Old;
            string Who;
            string Bigbus;
            string Eat;
            string PS;


            ID = Convert.ToInt32(GridView3.DataKeys[r.RowIndex].Value);
            //SignupTotalid = int.Parse(((Label)r.FindControl("SignupTotalid")).Text);
            Name     = ((TextBox)r.FindControl("Name")).Text;
            IDnumber = ((TextBox)r.FindControl("IDnumber")).Text;
            Birthday = ((TextBox)r.FindControl("Birthday")).Text;
            Old      = ((TextBox)r.FindControl("Old")).Text;
            Who      = ((TextBox)r.FindControl("Who")).Text;
            Bigbus   = ((TextBox)r.FindControl("Bigbus")).Text;
            Eat      = ((TextBox)r.FindControl("Eat")).Text;
            PS       = ((TextBox)r.FindControl("PS")).Text;


            DataRow row = originalDataTable.Select(String.Format("ID = {0}", ID))[0];

            //if (!SignupTotalid.Equals(row["SignupTotalid"].ToString())) { return true; }
            if (!Name.Equals(row["Name"].ToString()))
            {
                return(true);
            }
            if (!IDnumber.Equals(row["IDnumber"].ToString()))
            {
                return(true);
            }
            if (!Birthday.Equals(row["Birthday"].ToString()))
            {
                return(true);
            }
            if (!Old.Equals(row["Old"].ToString()))
            {
                return(true);
            }
            if (!Who.Equals(row["Who"].ToString()))
            {
                return(true);
            }
            if (!Bigbus.Equals(row["Bigbus"].ToString()))
            {
                return(true);
            }
            if (!Eat.Equals(row["Eat"].ToString()))
            {
                return(true);
            }
            if (!PS.Equals(row["PS"].ToString()))
            {
                return(true);
            }


            return(false);
        }