コード例 #1
0
ファイル: OrderPoolModel.cs プロジェクト: MetelevEvgenii/taxi
 public static OrderPoolModel GetInstance()
 {
     if (instance == null)
     {
         return(instance = new OrderPoolModel());
     }
     else
     {
         return(instance);
     }
 }
コード例 #2
0
        public OrderInstanceModel(string name, string phone, string lonA, string latA, string lonZ, string latZ,
                                  string locA, string locZ, List <string> options)
        {
            this.name    = name;
            this.phone   = phone;
            this.lonA    = lonA;
            this.lonZ    = lonZ;
            this.latA    = latA;
            this.latZ    = latZ;
            this.locA    = locA;
            this.locZ    = locZ;
            this.options = options;
            OrderPoolModel orders = OrderPoolModel.GetInstance();

            orderID = orders.GenerateOrderID(this);
        }