static UrlType GetUrlType(string url) { UrlType urlType = UrlType.Local; if (AzureHelper.MatchHandler(url)) { urlType = UrlType.Azure; } else if (AzureHelper.MatchFileHandler(url)) { urlType = UrlType.AzureFile; } else if (S3Helper.MatchHandler(url)) { urlType = UrlType.S3; } else if (SkyDriveHelper.MatchHandler(url)) { urlType = UrlType.SkyDrive; } else if (SharepointHelper.MatchHandler(url)) { urlType = UrlType.Sharepoint; } else if (DropboxHelper.MatchHandler(url)) { urlType = UrlType.Dropbox; } else { urlType = UrlType.Local; // local filesystem. } return(urlType); }
public ActionResult Login() { ViewBag.connmain = SharepointHelper.PushConf()["primaindb"]; ViewBag.connsec = SharepointHelper.PushConf()["secdbempmst"]; try { ViewBag.UrlApp = WebConfigure.GetDomain(); ViewBag.CheckLogin = WebConfigure.GetLoginPortal(); if (Common.CheckAdmin()) { _userBService.EndDelegate(); return(View()); } else { return(RedirectToAction("Index", "Default")); } } catch (Exception er) { _logErrorBService.WriteLog("Account", MethodBase.GetCurrentMethod().Name, er.ToString()); throw; } }
// GET: CSOM public ActionResult Index() { var lists = SharepointHelper.GetLists(); ViewBag.Lists = lists.Select(_ => _.Title); return(View()); }
public ActionResult CreateListItem(string listName, string id) { var model = new CreateListItemViewModel(); if (!string.IsNullOrWhiteSpace(id)) { model.Item = SharepointHelper.GetItem(listName, id); } model.ListTitle = listName; return(View(model)); }
public System.Data.DataSet GetList() { try { SharepointHelper SPHelper = new SharepointHelper(Web); return SPHelper.GetListDataSet(ListName); } catch (Exception ex) { throw ex; } }
public ActionResult ListDetails(string listName) { var list = SharepointHelper.GetList(listName); var model = new ListDetailsViewModel(); model.Title = listName; model.Items = list.Select(_ => new SPListItem() { Title = _["Title"].ToString(), Id = _["ID"].ToString() }); return(View(model)); }
public SharepointHelper CreateSharepointHelper() { string userName = null; string password = null; if (AuthenticationType == AuthenticationType.User) { userName = UserName; password = Password; } var sharepointHelper = new SharepointHelper(Server, userName, password); return(sharepointHelper); }
public DataSet GetAlojamientoListByDestino(string destino) { try { SharepointHelper SPHelper = new SharepointHelper(Web); SPList list = SPHelper.GetListItems(ListName); SPQuery query = new SPQuery(); query.Query = string.Format("<Where><Eq><FieldRef Name='Destino' /><Value Type='Lookup'>'{0}'</Value></Eq></Where>", destino); return list.GetItems(query).GetDataTable().DataSet; } catch (Exception ex) { throw ex; } }
public DataSet GetAcomodacionListByAlojamientoAndPeopleQuantity(string alojamiento, string max, string min) { try { SharepointHelper SPHelper = new SharepointHelper(Web); SPList list = SPHelper.GetListItems(ListName); SPQuery query = new SPQuery(); query.Query = string.Format("<Where><And><Eq><FieldRef Name='Tipo de Alojamiento' /><Value Type='Lookup'>'{0}'</Value></Eq><And><FieldRef Name='Cantidad de Personas Mínimo' /><Value Type='Number'>{1}</Value><FieldRef Name='Cantidad de Personas Máximo' /><Value Type='Number'>{2}</Value></And></And></Where>" , alojamiento, max, min); return list.GetItems(query).GetDataTable().DataSet; } catch (Exception ex) { throw ex; } }
public void SharepointHelper_Construct() { var s = new SharepointHelper("hostname"); }
public ActionResult DeleteItem(string listName, string id) { SharepointHelper.DeleteItem(listName, id); return(RedirectToAction("ListDetails", new { listName })); }
public ActionResult DeleteList(string listName) { SharepointHelper.DeleteList(listName); return(RedirectToAction("Index")); }
public ActionResult CreateListItem(CreateListItemViewModel model) { SharepointHelper.AddItemToList(model.ListTitle, model.Item); return(RedirectToAction("ListDetails", new { listName = model.ListTitle })); }
public ActionResult CreateList(CreateListViewModel model) { SharepointHelper.CreateList(model.Title); return(RedirectToAction("Index")); }