public static string Cancelar(string idcozinha, string idcomandaitem) { Cozinha cozinha = new Cozinha(); RepCozinha repCozinha = new RepCozinha(); cozinha.id_Cozinha = Convert.ToInt32(idcozinha); repCozinha.Delete(cozinha); //Comanda_Item comanda_Item = new Comanda_Item(); //RepComandaItem repComandaItem = new RepComandaItem(); //comanda_Item.id_Comanda_Item = Convert.ToInt32(idcomandaitem); //repComandaItem.Delete(comanda_Item); return(""); }
protected void Page_Load(object sender, EventArgs e) { entidade = Session["Objentidade"]; if (entidade != null) { RepCozinha repComanda = new RepCozinha(); DataTable Comandas = new DataTable(); Comandas = repComanda.Select_Cozinha(entidade); ListarComandas(Comandas); } else { Response.Redirect("../Entrada.aspx"); } }
public static string Status(string id, string status) { Cozinha cozinha = new Cozinha(); RepCozinha repCozinha = new RepCozinha(); if (status == "True") { cozinha.ic_Status = 0; } else { cozinha.ic_Status = 1; } cozinha.id_Comanda = Convert.ToInt32(id); repCozinha.Update(cozinha); return(""); }
public static string Pedir(string id_comanda_item, string id_comanda, string obs) { Cozinha cozinha = new Cozinha(); cozinha.id_Comanda_Item = Convert.ToInt32(id_comanda_item); cozinha.id_Comanda = Convert.ToInt32(id_comanda); cozinha.DataHora = DateTime.Now; cozinha.ic_Status = Convert.ToByte(false); if (obs == "") { cozinha.ds_Observacao = "Nenhuma observação"; } else { cozinha.ds_Observacao = obs; } RepCozinha repCozinha = new RepCozinha(); repCozinha.Enviar(cozinha); return(""); }