public string GeneralStore(TableName tablename, TableAction tableaction, string xml) { string table = tablename.ToString(); string action = tableaction.ToString(); string initialized = ServiceInitialized(table); if (initialized != "OK") { return(initialized); } switch (action.Trim().ToUpper()) { case "GET": return(RunGet(table, xml)); case "INSERT": return(RunInsert(table, xml)); case "UPDATE": return(RunUpdate(table, xml)); case "DELETE": return(RunDelete(table, xml)); default: return("Action not recognized: " + action); } }
public ActionResult TableManager() { if (Session["role"] != null && (string)Session["role"] == "Manager") { ViewBag.Table = TableAction.Get_All_Table(); return(View()); } return(Redirect("~/Home/HomePage")); }
/// <summary> /// 转换成访问链接 /// </summary> /// <param name="name"></param> /// <param name="url"></param> /// <returns></returns> public static TableAction ToLinkAction(string name, string url, Flaticon flaticon = Flaticon.Interface5) { var tableAction = new TableAction { Name = name, Url = url, IconType = flaticon, Type = ActionLinkType.Link }; return(tableAction); }
/// <summary> /// 转换成删除链接 /// </summary> /// <param name="name"></param> /// <param name="url"></param> /// <returns></returns> public static TableAction ToDialogAction(string name, string url, Flaticon flaticon = Flaticon.Dashboard) { var tableAction = new TableAction { Name = name, Url = url, IconType = flaticon, Type = ActionLinkType.Dialog }; return(tableAction); }
/// <summary> /// 转换成删除链接 /// </summary> /// <param name="name"></param> /// <param name="url"></param> /// <returns></returns> public static TableAction ToDeleteAction(string name, string url) { var tableAction = new TableAction { Name = name, Url = url, IconType = Flaticon.Delete, Type = ActionLinkType.Delete }; return(tableAction); }
public bool?SuportItemData(Config.Config config, string jsonKeys, TableAction action) { switch (action) { case TableAction.I: case TableAction.U: case TableAction.D: return(Integrate.SuportItem(jsonKeys, config.GetConfigIntegrate())); } return(null); }
public ActionResult ProductRestore() { if (Session["role"] != null && (string)Session["role"] == "Manager") { ViewBag.Product = ProductAction.Get_Delete_Product(); ViewBag.Table = TableAction.Get_Table_Delete(); return(View()); } else { return(Redirect("~/Home/Index")); } }
public static TableAction ToLinkAction(string name, TableActionType tableActionType, Type formType, Flaticon flaticon = Flaticon.Interface5) { var tableAction = new TableAction { Name = name, FormType = formType.Name, IconType = flaticon, Type = ActionLinkType.Dialog, ActionType = tableActionType }; return(tableAction); }
public object FillterAccionSql(Config.Config config, string jsonKeys, TableAction action) { if (!config.OperationContinue) { return(null); } switch (action) { case TableAction.I: case TableAction.U: return(Integrate.Save(jsonKeys, config.GetConfigIntegrate(), null)); } return(null); }
public ActionResult Book_Table(int ID_Table) { ReservationAction.Auto_Cancel(); string phone = (string)Session["member_id"]; if (MemberShipAction.Find_MemberShip_By_Phone(phone).score >= 10) { ReservationAction.Create_Reservation(phone, ID_Table); TableAction.Delete_Table(ID_Table); return(Redirect("~/Home/HomePage")); } return(View()); }
public JsonResult GetAllTable() { return(Json(TableAction.Get_Table_By_Customer(), JsonRequestBehavior.AllowGet)); }
public JsonResult GetTable(int ID) { return(Json(TableAction.Find_Table_By_ID(ID), JsonRequestBehavior.AllowGet)); }
public ActionResult RestoreTable(int ID) { TableAction.Table_Restore(ID); return(Redirect("~/Manager/TableManager")); }
public ActionResult DeleteTable(int ID) { TableAction.Delete_Table(ID); return(Redirect("~/Manager/TableManager")); }
public ActionResult Create_Table(int Seats) { TableAction.Create_Table(Seats); return(Redirect("~/Manager/TableManager")); }
// is the participant okay with the action we're doing? // this logic should probably live in a different class public bool AcceptsAction(TableAction action) { // TO DO: fix this return(true); }
public ActionResult Checkout_Table(int ID_Table) { TableAction.Table_Restore(ID_Table); return(Redirect("~/MemberShip/List_Reservation")); }
public void UpdateModel(string id, TableAction action, Dictionary <UpdateKey, object> arguments) { if (action == TableAction.UpdateAll) { double x = (double)arguments[UpdateKey.X]; double y = (double)arguments[UpdateKey.Y]; repository.UpdateTableCoordinates(id, x, y); int scaleX = (int)arguments[UpdateKey.ScaleX]; int scaleY = (int)arguments[UpdateKey.ScaleY]; repository.UpdateTableScaleX(id, scaleX); repository.UpdateTableScaleY(id, scaleY); int rotateAngle = (int)arguments[UpdateKey.Angle]; repository.UpdateTableRotateAngle(id, rotateAngle); string name = (string)arguments[UpdateKey.Name]; repository.UpdateTableName(id, name); string color = (string)arguments[UpdateKey.Color]; repository.UpdateTableColor(id, color); TableShape shape = (TableShape)arguments[UpdateKey.Shape]; repository.UpdateTableShape(id, shape); Table model = repository.GetModel(id); view.Update(model, TableLayoutUpdateMode.All); } if (action == TableAction.Create) { string newId = repository.AddTable(arguments); Table model = repository.GetModel(newId); view.Update(model, TableLayoutUpdateMode.New); } else if (action == TableAction.UpdateCoordinates) { double x = (double)arguments[UpdateKey.X]; double y = (double)arguments[UpdateKey.Y]; repository.UpdateTableCoordinates(id, x, y); Table model = repository.GetModel(id); view.Update(model, TableLayoutUpdateMode.Coordinates); } else if (action == TableAction.SetSelected) { Table model = repository.GetModel(id); view.Update(model, TableLayoutUpdateMode.SetSelected); } else if (action == TableAction.SetUnselected) { Table model = repository.GetModel(id); view.Update(model, TableLayoutUpdateMode.SetUnselected); } else if (action == TableAction.Delete) { Table model = repository.GetModel(id); repository.DeleteTable(id); view.Update(model, TableLayoutUpdateMode.Delete); } else if (action == TableAction.Rotate) { repository.UpdateTableRotateAngle(id, 0); Table model = repository.GetModel(id); view.Update(model, TableLayoutUpdateMode.Rotate); } else if (action == TableAction.UpdateName) { string name = (string)arguments[UpdateKey.Name]; repository.UpdateTableName(id, name); Table model = repository.GetModel(id); view.Update(model, TableLayoutUpdateMode.UpdateName); } else if (action == TableAction.Save) { repository.Save(); } else if (action == TableAction.RevertChanges) { repository.RevertChanges(); } }
public ActionResult ShowTable() { ViewBag.Table = TableAction.Get_All_Table(); return(View()); }
public bool ActionIsValidForParticipant(TableAction type, Participant participant) { // TO DO: fix this return(true); }
public Table(string name, TableAction action = TableAction.None) { Name = name; Columns = new List<Column>(); Action = action; }
public bool?SuportItemData(Config.Config config, string jsonKeys, TableAction action) { throw new NotImplementedException(); }