public bool ConBranchHechsherRegular(Branch d)//(condition for the delegate)checks if the hechsher is regular
        {
            hechsher b = (hechsher)1;

            if (d.Hechsher == b)
            {
                return(true);
            }
            return(false);
        }
        public bool ConBranchHechsherMedium(Branch d)//(condition for the delegate)checks if the hechsher is medium
        {
            hechsher b = (hechsher)2;

            if (d.Hechsher == b)
            {
                return(true);
            }
            return(false);
        }
        public bool ConBranchHechsherBest(Branch d) //(condition for the delegate)checks if the hechsher is best
        {
            hechsher b = (hechsher)3;               //best

            if (d.Hechsher == b)
            {
                return(true);
            }
            return(false);
        }
        public bool conOrderHechsher3(Order or)//(condition for the delegate)checks if the hechsher is regular
        {
            hechsher b = (hechsher)1;

            if (or.Hechsher == b)
            {
                return(true);
            }
            return(false);
        }
        public bool conOrderHechsher2(Order or)//(condition for the delegate)checks if the hechsher is medium
        {
            hechsher b = (hechsher)2;

            if (or.Hechsher == b)
            {
                return(true);
            }
            return(false);
        }
Ejemplo n.º 6
0
 //constructor
 public Dish(int dishnumber, string dishname, size dishsize, float dishprice, int rate, hechsher hechsherr, int calories)
 {
     dishNumber = dishnumber;
     dishName   = dishname;
     dishSize   = dishsize;
     dishPrice  = dishprice;
     Hechsher   = hechsherr;
     Calories   = calories;
     Rate       = rate;
 }
Ejemplo n.º 7
0
 //constructor
 public Branch(int branchnumber, city mycity, string branchname, string branchadress, string branchphonenumber, string manager, int branchnumworkers, int branchavailabledeliveryGuys, hechsher hhechsher)
 {
     branchNumber                = branchnumber;
     branchName                  = branchname;
     Mycity                      = mycity;
     branchAdress                = branchadress;
     branchPhoneNumber           = branchphonenumber;
     Manager                     = manager;
     branchNumWorkers            = branchnumworkers;
     branchAvailableDeliveryGuys = branchavailabledeliveryGuys;
     Hechsher                    = hhechsher;
 }
Ejemplo n.º 8
0
        //construcot for order that gets name and not a costumer
        public Order(string Costuertz, DateTime d, int branchnumber, hechsher h, int numworkers)
        {
            costumerTz = Costuertz;
            string temp = "";

            for (int i = 0; i < 8 - ((s.ToString()).Length); i++)
            {
                temp += "0";
            }
            temp       += s.ToString();
            orderNumber = temp;
            s          += 1;
            //initializes the rest of the details
            date         = d;
            branchNumber = branchnumber;
            Hechsher     = h;
            numWorkers   = numworkers;
            numWorkers   = 1;//one worker needed foe every order
        }