protected void Page_Load(object sender, EventArgs e) { string rawDocketInfo = BLDocketHelper.Instance.GetDocketsForUserIdInXML(SessionHelper.Instance.GetUserId()); if (String.IsNullOrEmpty(rawDocketInfo) || rawDocketInfo.Trim().Equals(string.Empty)) return; docketsForUser = new List<UIDocket.Docket>(); XmlDocument xDoc = new XmlDocument(); xDoc.LoadXml(rawDocketInfo); XmlNodeList xList = xDoc.SelectNodes("//Dockets//Docket"); foreach (XmlNode xNode in xList) { int id; string number, inventionName, inventorName, typeOfApp; DateTime createdOn; id = Int32.Parse(xNode.SelectSingleNode("id").InnerText); number = xNode.SelectSingleNode("number").InnerText; inventionName = xNode.SelectSingleNode("invention_name").InnerText; inventorName = xNode.SelectSingleNode("inventor_name").InnerText; typeOfApp = xNode.SelectSingleNode("type_of_app").InnerText; createdOn = Convert.ToDateTime(xNode.SelectSingleNode("created_on").InnerText); UIDocket.Docket docket = new UIDocket.Docket(id, number, inventionName, inventorName, typeOfApp, createdOn); docketsForUser.Add(docket); } SessionHelper.Instance.SetDockets(docketsForUser.ToArray()); }
public string Execute() { UIDocket.Docket newDocket = new UIDocket.Docket(Int32.MinValue, String.Empty, arguments["inventionName"], arguments["inventorName"], arguments["appType"], DateTime.MinValue); string errorMessage; Dictionary<string, string> jsonParameters = new Dictionary<string, string>(); bool success = newDocket.Save(out errorMessage); jsonParameters.Add("docketId", newDocket.Number); return Utilites.UtilityFunctions.JSONifyOutput(success, errorMessage, jsonParameters); }
public bool SetSelectedDocket(UIDocket.Docket docket) { UIDocket.Docket[] selectedDocketList = new UIDocket.Docket[1]; selectedDocketList[0] = docket; UIDocket.Docket[] dockets = selectedDocketList; return true; }