/// <summary> /// Process data from database for the FileForm for the current user /// </summary> /// <param name="familyNumber">A Filter that can be used</param> /// <param name="extendedTitle">An extended title that can be used</param> /// <returns>View containing the FilesModel</returns> public ActionResult FilesForm(String familyNumber = null, String extendedTitle = null) { using (var e = new EntityContext()) { var data = DataForms.GetFilesForm(SessionHelper.GetSessionUser(), e); // new model var model = new FilesModel.Form(); // extends the page name model.SetExtendedTitle(extendedTitle); // filters if (familyNumber != null) { data.FileNumbers = data.FileNumbers.Where(p => p.Family_Listings.Select(q => q.Family_Number).Contains(familyNumber)).ToList(); // if no extended name try to find one if (!model.HasExtendedTitle()) { model.SetExtendedTitle(data.FileNumbers.FirstOrDefault()?.Project_Numbers.Project_Name); } } model.Files = data.FileNumbers.Select(p => new FilesModel.Item() { Continuity = p.Continuity, FileName = p.File_Name, FileNum = p.File_Number1, LawFirm = p.Law_Firm, ProjectNum = p.Project_Number.HasValue ? p.Project_Number.ToString() : "", SerialNum = p.Serial_Number, Status = p.Status }).ToList(); return(View(model)); } }
private void LoadExtensions() { this.version = this.im.LoadExtension <SoftwareVersion>(); this.sdisco = this.im.LoadExtension <ServiceDiscovery>(); this.ecapa = this.im.LoadExtension <EntityCapabilities>(); this.ping = this.im.LoadExtension <S22.Xmpp.Extensions.Ping>(); this.attention = this.im.LoadExtension <Attention>(); this.time = this.im.LoadExtension <EntityTime>(); this.block = this.im.LoadExtension <BlockingCommand>(); this.pep = this.im.LoadExtension <Pep>(); this.userTune = this.im.LoadExtension <UserTune>(); this.userAvatar = this.im.LoadExtension <UserAvatar>(); this.userMood = this.im.LoadExtension <UserMood>(); this.dataForms = this.im.LoadExtension <DataForms>(); this.featureNegotiation = this.im.LoadExtension <FeatureNegotiation>(); this.streamInitiation = this.im.LoadExtension <StreamInitiation>(); this.siFileTransfer = this.im.LoadExtension <SIFileTransfer>(); this.inBandBytestreams = this.im.LoadExtension <InBandBytestreams>(); this.userActivity = this.im.LoadExtension <UserActivity>(); this.socks5Bytestreams = this.im.LoadExtension <Socks5Bytestreams>(); this.FileTransferSettings = new S22.Xmpp.Client.FileTransferSettings(this.socks5Bytestreams, this.siFileTransfer); this.serverIpCheck = this.im.LoadExtension <ServerIpCheck>(); this.inBandRegistration = this.im.LoadExtension <InBandRegistration>(); this.chatStateNotifications = this.im.LoadExtension <ChatStateNotifications>(); this.bitsOfBinary = this.im.LoadExtension <BitsOfBinary>(); }
/// <summary> /// Returns the view for recent activites /// </summary> /// <param name="fileNumber">a filter by attribute</param> /// <param name="projectNumber">a filter by attribute</param> /// <returns>the view containing the recent activites model</returns> public ActionResult RecentActivities(String fileNumber = null, String projectNumber = null, String extendedTitle = null) { using (var e = new EntityContext()) { var recentActivitesObject = DataForms.GetRecentActivites(SessionHelper.GetSessionUser(), e); var model = new RecentActivitiesModel.Form(); // extends the page name model.SetExtendedTitle(extendedTitle); // filters if (fileNumber != null) { recentActivitesObject = recentActivitesObject.Where(p => p.FileNumber.File_Number1 == fileNumber).ToList(); if (!model.HasExtendedTitle()) // if no extended name try to find one { model.SetExtendedTitle(recentActivitesObject.FirstOrDefault()?.FileNumber.File_Name); } } if (projectNumber != null) { recentActivitesObject = recentActivitesObject.Where(p => p.FileNumber.Project_Number.ToString() == projectNumber).ToList(); if (!model.HasExtendedTitle()) // if no extended name try to find one { model.SetExtendedTitle(recentActivitesObject.FirstOrDefault()?.FileNumber.Project_Numbers.Project_Name); } } foreach (var fileNumWithTransAct in recentActivitesObject) { var fileNum = fileNumWithTransAct.FileNumber; foreach (var transAct in fileNumWithTransAct.Transactions) { model.RecentActivities.Add(new RecentActivitiesModel.Item() { Date = transAct.Transaction_Date.Value, Activity = transAct.Code, Details = transAct.Details, Notes = transAct.Notes, FileNum = fileNum.File_Number1, FileName = fileNum.File_Name, Status = fileNum.Status, SerialNum = fileNum.Serial_Number, LawFirm = fileNum.Law_Firm }); } } return(View(model)); } }
/// <summary> /// Uses the model for the Families form and fills the appropriate data fields /// </summary> /// <returns> Page with table containing the data according to the model </returns> public ActionResult FamiliesForm() { using (var e = new EntityContext()) { var familesObject = DataForms.GetFamiliesForm(SessionHelper.GetSessionUser(), e); var model = new FamiliesModel.Form(); foreach (var familyWithFileNums in familesObject) { model.Families.Add(new FamiliesModel.Item { FamilyName = familyWithFileNums.Family.Family_Name, FamilyNum = familyWithFileNums.Family.Family_Number, // if any file is still active the family is considered active Status = familyWithFileNums.FileNumbers.Any(p => p.Status == StatusEnum.Active) ? StatusEnum.Active : StatusEnum.Inactive }); } return(View(model)); } }
/// <summary> /// Uses the model for the Inventions form and fills the appropriate data fields /// </summary> /// <returns> Page with table containing data according to the model </returns> public ActionResult InventionsForm() { using (var e = new EntityContext()) { var data = DataForms.GetInventionsForm(SessionHelper.GetSessionUser(), e); var model = new InventionsModel.Form() { Inventions = data.ProjectNumber.Select(p => new InventionsModel.Item() { Status = p.Status, ProjectNumber = p.Project_Number1, ProjectTitle = p.Project_Title }).ToList() }; return(View(model)); } }
public void FillDataForm(DataForms.UserAddresses dataForm) { txtFirstName.Clear(); txtFirstName.SendKeys(dataForm.txtFirstName); txtLastName.Clear(); txtLastName.SendKeys(dataForm.txtLastName); txtCompanyName.Clear(); txtCompanyName.SendKeys(dataForm.txtCompanyName); txtAddress1.Clear(); txtAddress1.SendKeys(dataForm.txtAddress1); txtAddress2.Clear(); txtAddress2.SendKeys(dataForm.txtAddress2); txtCity.Clear(); txtCity.SendKeys(dataForm.txtCity); txtPostalCode.Clear(); txtPostalCode.SendKeys(dataForm.txtPostalCode); txtPhoneNumber.Clear(); txtPhoneNumber.SendKeys(dataForm.txtPhoneNumber); txtCCNumber.Clear(); txtCCNumber.SendKeys(dataForm.txtCCNumber); }
public void FillDataForm(DataForms.SendToFriend dataForm) { txtSendToFriendYourName.Clear(); txtSendToFriendYourName.SendKeys(dataForm.txtSendToFriendYourName); txtSendToFriendYourEmail.Clear(); txtSendToFriendYourEmail.SendKeys(dataForm.txtSendToFriendYourEmail); txtSendToFriendFriendEmail.Clear(); txtSendToFriendFriendEmail.SendKeys(dataForm.txtSendToFriendFriendEmail); txtSendToFriendPersonalMessage.Clear(); txtSendToFriendPersonalMessage.SendKeys(dataForm.txtSendToFriendPersonalMessage); }
public void FillShippingForm(DataForms.CartShipping dataForm) { txtShippingInfoFirstName.Clear(); txtShippingInfoFirstName.SendKeys(dataForm.txtShippingInfoFirstName); txtShippingInfoLastName.Clear(); txtShippingInfoLastName.SendKeys(dataForm.txtShippingInfoLastName); txtShippingInfoCompanyName.Clear(); txtShippingInfoCompanyName.SendKeys(dataForm.txtShippingInfoCompanyName); txtShippingInfoAddress1.Clear(); txtShippingInfoAddress1.SendKeys(dataForm.txtShippingInfoAddress1); txtShippingInfoAddress2.Clear(); txtShippingInfoAddress2.SendKeys(dataForm.txtShippingInfoAddress2); txtShippingInfoCity.Clear(); txtShippingInfoCity.SendKeys(dataForm.txtShippingInfoCity); txtShippingInfoPostalCode.Clear(); txtShippingInfoPostalCode.SendKeys(dataForm.txtShippingInfoPostalCode); txtShippingInfoPhoneNumber.Clear(); txtShippingInfoPhoneNumber.SendKeys(dataForm.txtShippingInfoPhoneNumber); }