Example #1
0
        public Appointment(int appointmentid, Treatment name, Costumer costumers_Appointments, int totalsumtopay, DateTime dateandtime, bool payedforappointment, string employee)
        {
            this.appointmentID = appointmentid;
            this.name = name;
            this.costumers_Appointments = costumers_Appointments;
            this.totalsumtopay = name.GetPrice();
            this.dateandtime = dateandtime;
            this.payedforappointment = payedforappointment;
            this.employee = employee;
           

        }
Example #2
0
        public static void init_costumer()//מילוי המערך מתוך בסיס הנתונים
        {
            Costumerslist = new List<Costumer>();

            SqlCommand c = new SqlCommand();
            c.CommandText = "EXECUTE dbo.Get_all_ListCostumers";
            SQL_CON SC = new SQL_CON();
            SqlDataReader rdr = SC.execute_query(c);


            while (rdr.Read())
            {

                Costumer co = new Costumer(int.Parse(rdr.GetValue(0).ToString()), rdr.GetValue(1).ToString(), int.Parse(rdr.GetValue(2).ToString()));
                Costumerslist.Add(co);
            }
        }