//菜品传值 public void getstrCategories() { GetInformation.address = "categories";//菜品 GetInformation gc = new GetInformation(); Str_Categories = gc.GetHTTPInfo();//接收JSON数据 }
//所有菜品名称 public void getalldishes() { GetInformation.address = "menu";//所有菜品 GetInformation gc = new GetInformation(); Str_Alldishes = gc.GetHTTPInfo();//接受JSON数据 }
public void GetPaymentReasons() { GetInformation.address = "payment/reasons";//桌子状态信息 GetInformation gi = new GetInformation(); Str_Reasons = gi.GetHTTPInfo();//接收JSON数据 }
public List <string> SelectIDList = new List <string>();//将被选中的桌子的消费ID存放进集合 //桌子传值 public void getstrTables() { GetInformation.address = "tables";//桌子 GetInformation gd = new GetInformation(); Str_Tables = gd.GetHTTPInfo();//接收JSON数据 }
//桌子状态信息查询 public void getstrstatus() { GetInformation.address = "statuses";//桌子状态信息 GetInformation gd = new GetInformation(); Str_Status = gd.GetHTTPInfo();//接收JSON数据 }
public string Str_Shift; //登录信息 public void getstrrestaurant() { GetInformation.address = "restaurant";//餐厅信息 GetInformation gd = new GetInformation(); Str_Restaurant = gd.GetHTTPInfo();//接收JSON数据 }
//单个预定信息查询 public string getstrbooking(string p_Id) { GetInformation.address = "bookings/" + p_Id; //单个预定状态信息 GetInformation gd = new GetInformation(); string strresult = gd.GetHTTPInfo(); //接收JSON数据 return(strresult); }
//预定信息查询 public string getstrbookings(string p_Date) { GetInformation.address = string.Format("bookings?date={0}", p_Date); //预定状态信息 GetInformation gd = new GetInformation(); string strresult = gd.GetHTTPInfo(); //接收JSON数据 return(strresult); }
//消费ID的信息查询 public Consumption GetConsumption(string p_ConsumptionId) { GetInformation.address = "consumptions/" + p_ConsumptionId;//桌子状态信息 GetInformation gi = new GetInformation(); string result = gi.GetHTTPInfo(); var jserConsumption = new JavaScriptSerializer(); Consumption personsConsumption = jserConsumption.Deserialize<Consumption>(result);//解析json数据 return personsConsumption; }
//检索菜品 private List <Item> GetDishes(string p_Condition) { GetInformation.address = "items?name=" + p_Condition; GetInformation gc = new GetInformation(); string result = gc.GetHTTPInfo();//接收JSON数据 var jserCategories = new JavaScriptSerializer(); List <Item> items = jserCategories.Deserialize <List <Item> >(result);//解析json数据 return(items); }
//消费ID的信息查询 public void getconsumptionsid() { GetInformation.address = "consumptions/" + this.Txt_Master.Text;//桌子状态信息 if (this.Txt_Master.Text != "") { GetInformation gi = new GetInformation(); Str_consumptionsid = gi.GetHTTPInfo();//接收JSON数据 } else { Str_consumptionsid = ""; } }
//消费ID的信息查询 public void getconsumptionsid() { GetInformation.address = "consumptions/" + PassValue.consumptionid;//桌子状态信息 if (PassValue.consumptionid != "") { GetInformation gi = new GetInformation(); Str_consumptionsid = gi.GetHTTPInfo();//接收JSON数据 } else { Str_consumptionsid = ""; } }
public void getShifts() { GetInformation.address = "shifts/" + PassValue.shiftId;//桌子状态信息 if (PassValue.shiftId != "") { GetInformation gi = new GetInformation(); Str_Shift = gi.GetHTTPInfo();//接收JSON数据 } else { Str_Shift = ""; } }
private ConsumptionObj GetConsumptionObj(string p_ConsumptionId) { GetInformation.address = "consumptions/" + p_ConsumptionId; GetInformation gc = new GetInformation(); string result = gc.GetHTTPInfo(); //接收JSON数据 var consumption = new JavaScriptSerializer(); var personsConsumption = consumption.Deserialize <Consumption>(result); //解析json数据 ConsumptionObj obj = new ConsumptionObj(); obj.Consumption = personsConsumption; return(obj); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Main); GetInformation getInfo = new GetInformation(); getInfo.OnGetInfoComplete += GetInfo_OnGetInfoComplete; getInfo.Show(FragmentManager, "GetInfo"); AppCenter.Start("34a69288-2d3b-4909-b542-188878f55b33", typeof(Analytics), typeof(Crashes)); }
private List <Detail> GetFinishedDetails(string p_CurrentConsumptionId) { List <Detail> details = new List <Detail>(); //if (PassValue.consumptionid != null) //{ GetInformation.address = "consumptions/" + p_CurrentConsumptionId; GetInformation gc = new GetInformation(); string result = gc.GetHTTPInfo();//接收JSON数据 var jserCategories = new JavaScriptSerializer(); Consumption consumption = jserCategories.Deserialize <Consumption>(result);//解析json数据 if (consumption.details != null) { details.AddRange(consumption.details); } //} return(details); }