예제 #1
0
        public static void appoint_client(client c, int id)
        {
            Repairer r = Search_Repairer(id);

            r.Appointment_name = c.Name_client;
            edit(r);
        }
예제 #2
0
        /*public static Repairer Get_id_repairer(int id)
         * {
         *
         * }
         * public static int Give_bonus(Repairer r)
         * {
         *
         * }
         * public static bool Remove_account(Repairer r)
         * {
         *
         * }*/
        public static bool Repairer_NotBusy(Repairer r)
        {
            bool status = false;

            if (r.Appointment_name == null)
            {
                status = true;
            }
            return(status);
        }
예제 #3
0
        public static void Add_Repairer(string name, string addres, string cellno, string cnic, int id)
        {
            Repairer r = new Repairer();

            r.Name          = name;
            r.Address       = addres;
            r.Phone_number1 = cellno;
            r.Person_id1    = cnic;
            r.Id            = id;
            repairers.Add(r);
        }
예제 #4
0
        public void remove_order(client c, int id)
        {
            Repairer r = RepairersRecords.Search_Repairer(id);

            foreach (client cl in r.Orders)
            {
                if (c == cl)
                {
                    r.Orders.Remove(cl);
                }
            }
        }
예제 #5
0
        public static Repairer Search_Repairer(int id)
        {
            Repairer rp = new Repairer();

            foreach (Repairer r in repairers)
            {
                if (r.Id == id)
                {
                    rp = r;
                }
            }
            return(rp);
        }
예제 #6
0
        public static bool edit(Repairer r)
        {
            bool status = false;

            foreach (Repairer rep in repairers)
            {
                if (rep.Person_id1 == r.Person_id1)
                {
                    repairers.Remove(rep);
                    repairers.Add(r);
                    status = true;
                    break;
                }
            }
            return(status);
        }
예제 #7
0
 /*public static Repairer Get_id_repairer(int id)
  * {
  *
  * }
  * public static int Give_bonus(Repairer r)
  * {
  *
  * }
  * public static bool Remove_account(Repairer r)
  * {
  *
  * }*/
 public static bool Repairer_NotBusy(Repairer r)
 {
     return(true);
 }
예제 #8
0
        public bool Repairer_NotBuzy(Repairer r)
        {
            bool status = RepairersRecords.Repairer_NotBusy(r);

            return(status);
        }
예제 #9
0
        public bool edit_repairer(Repairer r)
        {
            bool x = RepairersRecords.edit(r);

            return(x);
        }
예제 #10
0
        public void del_repairer(int id)
        {
            Repairer r = RepairersRecords.Search_Repairer(id);

            RepairersRecords.repairers.Remove(r);
        }
예제 #11
0
        public Repairer Search_Repairer(int id)
        {
            Repairer r = RepairersRecords.Search_Repairer(id);

            return(r);
        }
예제 #12
0
 public bool Repairer_NotBuzy(Repairer r)
 {
     return(true);
 }