示例#1
0
 //used for bar and kitchen
 public Item(string name, int amount, string comment, string status, string type)
 {
     Name    = name;
     Amount  = amount;
     Comment = comment;
     Status  = (Enum_Item_Status)Enum.Parse(typeof(Enum_Item_Status), status, true);
     Type    = (Enum_Item_Type)Enum.Parse(typeof(Enum_Item_Type), type, true);
 }
示例#2
0
 //this constructor is used for within the program itself
 public Item(int itemID, decimal price, string name, string type, int stock)
 {
     ID    = itemID;
     Price = price;
     Name  = name;
     Type  = (Enum_Item_Type)Enum.Parse(typeof(Enum_Item_Type), type, true);
     Stock = stock;
 }
示例#3
0
 //this constructor is used for the database
 public Item(int itemID, int orderID, string name, string type, decimal price, int amount, string comment)
 {
     ID      = itemID;
     OrderID = orderID;
     Name    = name;
     Type    = (Enum_Item_Type)Enum.Parse(typeof(Enum_Item_Type), type, true);
     Price   = price;
     Amount  = amount;
     Comment = comment;
 }