public List <AssignedTo> GetHRList() { List <AssignedTo> lstAssignedTo = new List <AssignedTo>(); try { var query = (from hrdata in _auditToolContext.HROCRoster select new { HrThreeFourID = hrdata.Employee34IdLowerCase }).Distinct().ToList(); int rowno = 1; foreach (var emplist in query) { AssignedTo tempAssignedto = new AssignedTo { MemberID = rowno, MemberName = emplist.HrThreeFourID }; rowno++; lstAssignedTo.Add(tempAssignedto); } } catch (Exception ex) { _log.WriteErrorLog(new LogItem { ErrorType = "Error", ErrorSource = "SearchController_GetHRList", ErrorDiscription = ex.InnerException != null ? ex.InnerException.ToString() : ex.Message }); } return(lstAssignedTo.ToList()); }
private void _onStatusPropChange(CswNbtNodeProp Prop) { AssignedTo.setHidden(value: (Status.Value == Statuses.Pending || Status.Value == Statuses.Completed || Status.Value == Statuses.Cancelled), SaveToDb: true); Fulfill.setHidden(value: (Status.Value == Statuses.Pending || Status.Value == Statuses.Completed || Status.Value == Statuses.Cancelled), SaveToDb: true); //27800 - don't show redundant props when status is pending Request.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Name.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Requestor.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Status.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Priority.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); ExternalOrderNumber.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Type.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); switch (Status.Value) { case Statuses.Submitted: toggleReadOnlyProps(true, this); break; case Statuses.Cancelled: //This fallthrough is intentional case Statuses.Completed: CswNbtObjClassRequest NodeAsRequest = _CswNbtResources.Nodes[Request.RelatedNodeId]; if (null != NodeAsRequest) { NodeAsRequest.setCompletedDate(); } _toggleReadOnlyProps(IsReadOnly: true, ItemInstance: this); Node.setReadOnly(value: true, SaveToDb: true); break; } onStatusPropChange(Prop); }
public override int GetHashCode() { unchecked { return((AssignedTo != null ? AssignedTo.GetHashCode() : 0) ^ (ReportedBy != null ? ReportedBy.GetHashCode() : 0) ^ (Status != null ? Status.GetHashCode() : 0) ^ (Kind != null ? Kind.GetHashCode() : 0) ^ (Priority != null ? Priority.GetHashCode() : 0) ^ OrderBy.GetHashCode()); } }
public void Deserialize(GenericReader reader) { int version = reader.ReadInt(); switch (version) { case 0: { _Submitter = reader.ReadString(); _CreationTime = reader.ReadDateTime(); _LastUpdatedTime = reader.ReadDateTime(); _AssignedTo = (Server.BugTracker.AssignedTo)reader.ReadInt(); _Description = reader.ReadString(); _Title = reader.ReadString(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { CommentEntry e = new CommentEntry(); e.Deserialize(reader); if (_Comments == null) { _Comments = new List <CommentEntry>(); } _Comments.Add(e); } _Status = (BugStatus)reader.ReadInt(); break; } } }
private void FillDropDownList() { AssignedTo.DataSource = manager.Users.ToList(); AssignedTo.DataTextField = "UserName"; AssignedTo.DataValueField = "Id"; AssignedTo.DataBind(); }
public ActionResult DeleteConfirmed(int id) { AssignedTo assignedto = db.AssignedToes.Single(a => a.AssignedID == id); db.AssignedToes.DeleteObject(assignedto); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { AssignedTo assignedTo = db.AssignedTo.Where(assigned => (assigned.employeeID == id)).FirstOrDefault(); db.AssignedTo.Remove(assignedTo); db.SaveChanges(); return(RedirectToAction("Index")); }
public override LocalOperation Clone() { return(new GetField { AssignedTo = (LocalVariable)AssignedTo.Clone(), Instance = (LocalVariable)Instance.Clone(), FieldName = FieldName }); }
public ActionResult Create(AssignedTo assignedto) { if (ModelState.IsValid) { db.AssignedToes.AddObject(assignedto); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(assignedto)); }
public ActionResult Edit(AssignedTo assignedto) { if (ModelState.IsValid) { db.AssignedToes.Attach(assignedto); db.ObjectStateManager.ChangeObjectState(assignedto, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(assignedto)); }
protected void Page_Load(object sender, EventArgs e) { var context = new FeedbackContext(); Category.DataSource = context.Categories.Select(x => new ListItem() { Text = x.Name, Value = x.Id.ToString() }).ToList(); Category.DataBind(); AssignedTo.DataSource = context.Admins.Select(x => new ListItem() { Text = x.Username, Value = x.Id.ToString() }).ToList(); AssignedTo.DataBind(); //Is this a create or update? if (!string.IsNullOrEmpty(Request.Params["TaskId"])) { var id = int.Parse(Request.Params["TaskId"]); var item = context.Tasks.FirstOrDefault(x => x.Id == id); Subject.Text = item.Title; Description.Text = item.Description; Category.SelectedIndex = item.Id; DueDate.Text = item.DueDate.ToShortDateString(); AssociatedMessage.Text = item.AssociatedMessageId.ToString(); Notes.Text = item.Notes; IsComplete.Checked = item.Completed; } if (Page.IsPostBack) { Page.Validate(); if (Page.IsValid) { var task = new Task(); task.Title = Subject.Text; task.CategoryId = int.Parse(Category.SelectedValue); task.Description = Description.Text; task.DueDate = DateTime.Parse(DueDate.Text); task.AssignedToId = int.Parse(AssignedTo.Text); task.AssociatedMessageId = int.Parse(AssociatedMessage.Text); task.Notes = Notes.Text; task.Completed = IsComplete.Checked; context.Tasks.Add(task); context.SaveChanges(); } } }
private string GetInputQuery(CodeActivityContext context) { var cardsInput = new List <string>(); var first = Amount.Get(context); var after = AfterCursor.Get(context); if (first <= 0) { first = 20; } cardsInput.Add("first: " + first); if (!string.IsNullOrWhiteSpace(after)) { cardsInput.Add(string.Format("after: {0}", after.ToQueryValue())); } var searchFields = new List <string>(); var assignees = AssignedTo.Get(context); var ignoreIds = IgnoreIDs.Get(context); var labels = Labels.Get(context); var title = Title.Get(context); if (assignees?.Length > 0) { searchFields.Add(string.Format("assignee_ids: {0}", assignees.ToQueryValue())); } if (ignoreIds?.Length > 0) { searchFields.Add(string.Format("ignore_ids: {0}", ignoreIds.ToQueryValue())); } if (labels?.Length > 0) { searchFields.Add(string.Format("label_ids: {0}", labels.ToQueryValue())); } if (!string.IsNullOrWhiteSpace(title)) { searchFields.Add(string.Format("title: {0}", title.ToQueryValue())); } string searchFieldsStr = string.Empty; if (searchFields.Count > 0) { searchFieldsStr = "search { " + string.Join(" ", searchFields) + " }"; cardsInput.Add(searchFieldsStr); } return(string.Join(" ", cardsInput)); }
public ActionResult Edit([Bind(Include = "assetId,employeeID,assignationDate,branchID,assignationLocation")] AssignedTo assignedTo) { if (ModelState.IsValid) { db.Entry(assignedTo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.assetId = new SelectList(db.Asset, "id", "category", assignedTo.assetId); ViewBag.branchID = new SelectList(db.Branch, "id", "branchName", assignedTo.branchID); ViewBag.employeeID = new SelectList(db.Employee, "id", "firstName", assignedTo.employeeID); return(View(assignedTo)); }
public BugEntry(string submitter, string title, string description) { _Submitter = submitter; _Title = title; _Description = description; _CreationTime = DateTime.Now; _LastUpdatedTime = _CreationTime; _AssignedTo = AssignedTo.Jeff; _Status = BugStatus.New; _Comments = new List <CommentEntry>(); }
// GET: AssignedTo/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AssignedTo assignedTo = db.AssignedTo.Where(assigned => (assigned.employeeID == id)).FirstOrDefault(); if (assignedTo == null) { return(HttpNotFound()); } return(View(assignedTo)); }
protected override void Execute(CodeActivityContext context) { Lead l = Lead.Get(context); l.AssignedTo = AssignedTo.Get(context); l.Status = "Assigned"; PersistLead persist = context.GetExtension <PersistLead>(); persist.AddLead(l, "Update"); // Store the request in the OutArgument Lead.Set(context, l); }
private void _toggleRequestItemPropVisibility() { bool HideTheseProperties = (_IsFavorite || _IsRecurring); Status.setHidden(value: HideTheseProperties, SaveToDb: true); Fulfill.setHidden(value: HideTheseProperties, SaveToDb: true); AssignedTo.setHidden(value: HideTheseProperties, SaveToDb: true); Number.setHidden(value: HideTheseProperties, SaveToDb: true); NeededBy.setHidden(value: HideTheseProperties, SaveToDb: true); TotalMoved.setHidden(value: HideTheseProperties, SaveToDb: true); TotalDispensed.setHidden(value: HideTheseProperties, SaveToDb: true); ReceiptLotToDispense.setHidden(value: HideTheseProperties, SaveToDb: true); ReceiptLotsReceived.setHidden(value: HideTheseProperties, SaveToDb: true); GoodsReceived.setHidden(value: HideTheseProperties, SaveToDb: true); }
protected override void Execute(CodeActivityContext context) { MeetingApplyForm meetingApplyForm = new MeetingApplyForm(); YunShanOA.DataAccess.Mapping.YunShanOADataContext dc = new YunShanOADataContext(); meetingApplyForm.ApplyUserName = AssignedTo.Get(context).ApplyUserName; meetingApplyForm.BeginTime = AssignedTo.Get(context).BeginTime; meetingApplyForm.Comments = AssignedTo.Get(context).Comments; meetingApplyForm.EndTime = AssignedTo.Get(context).EndTime; meetingApplyForm.MeetingIntroduction = AssignedTo.Get(context).MeetingIntroduction; meetingApplyForm.MeetingStatus = 2; meetingApplyForm.MeetingTopic = AssignedTo.Get(context).MeetingTopic; meetingApplyForm.MeetingTypeID = AssignedTo.Get(context).MeetingTypeID; meetingApplyForm.WFID = context.WorkflowInstanceId; var query = from p in dc.Workflows where p.WFID == meetingApplyForm.WFID select p; if (0 == query.Count()) { YunShanOA.DataAccess.Mapping.Workflows wf = new Workflows(); wf.WFID = meetingApplyForm.WFID; wf.WFTID = Guid.NewGuid(); dc.Workflows.InsertOnSubmit(wf); } var query1 = from p in dc.MeetingApplyForm where p.WFID == meetingApplyForm.WFID select p; if (0 == query1.Count()) { dc.MeetingApplyForm.InsertOnSubmit(meetingApplyForm); //将数据插入到MeetingApplyForm表 dc.SubmitChanges(); //提交MeeingApplyForm的更改,以便下面根据WFID来查询MeetingApplyFormID var quer = from p in dc.MeetingApplyForm where p.WFID == meetingApplyForm.WFID select p; if (0 != quer.Count()) { Model.MeetingRoom mar = new Model.MeetingRoom(); mar = MeetingRoomNameAndID.Get(context); int meetingApplyFormID = quer.First().MeetingApplyFormID; DataAccess.Mapping.MeetingAndRoom m = new MeetingAndRoom(); m.Status = 2; m.MeetingApplyFormID = meetingApplyFormID; m.MeetingRoomID = mar.MeetingRoomID; dc.MeetingAndRoom.InsertOnSubmit(m); dc.SubmitChanges(); } } Apply.Set(context, meetingApplyForm); }
// GET: AssignedTo/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AssignedTo assignedTo = db.AssignedTo.Where(assigned => (assigned.employeeID == id)).FirstOrDefault(); if (assignedTo == null) { return(HttpNotFound()); } ViewBag.assetId = new SelectList(db.Asset, "id", "category", assignedTo.assetId); ViewBag.branchID = new SelectList(db.Branch, "id", "branchName", assignedTo.branchID); ViewBag.employeeID = new SelectList(db.Employee, "id", "firstName", assignedTo.employeeID); return(View(assignedTo)); }
protected override void Execute(CodeActivityContext context) { // Create an Assignment class and populate its properties Assignment a = new Assignment(); a.WorkflowID = context.WorkflowInstanceId; a.LeadID = LeadID.Get(context); a.DateAssigned = DateTime.Now; a.AssignedTo = AssignedTo.Get(context); a.Status = "Assigned"; a.DateDue = DateTime.Now + TimeSpan.FromDays(5); PersistAssignment persist = context.GetExtension <PersistAssignment>(); persist.AddAssignment(context.WorkflowInstanceId, a, "Insert"); // Store the request in the OutArgument Assignment.Set(context, a); }
protected override void Execute(NativeActivityContext context) { // Get the connection string DBExtension ext = context.GetExtension <DBExtension>(); if (ext == null) { throw new InvalidProgramException("No connection string available"); } // Query the Lead table LeadDataDataContext dc = new LeadDataDataContext(ext.ConnectionString); dc.Refresh(RefreshMode.OverwriteCurrentValues, dc.Leads); Lead l = dc.Leads.SingleOrDefault <Lead> (x => x.WorkflowID == context.WorkflowInstanceId); if (l == null) { throw new InvalidProgramException ("The Lead was not found in the database"); } l.AssignedTo = AssignedTo.Get(context); l.Status = "Assigned"; // Enlist on the current transaction RuntimeTransactionHandle rth = new RuntimeTransactionHandle(); rth = context.Properties.Find(rth.ExecutionPropertyName) as RuntimeTransactionHandle; if (rth != null) { Transaction t = rth.GetCurrentTransaction(context); dc.Connection.EnlistTransaction(t); } dc.SubmitChanges(); // Store the request in the OutArgument Lead.Set(context, l); }
public override int GetHashCode() { unchecked { var hashCode = (Project != null ? Project.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Tracker != null ? Tracker.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Priority != null ? Priority.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Author != null ? Author.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Category != null ? Category.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Subject != null ? Subject.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ StartDate.GetHashCode(); hashCode = (hashCode * 397) ^ DueDate.GetHashCode(); hashCode = (hashCode * 397) ^ DoneRatio.GetHashCode(); hashCode = (hashCode * 397) ^ PrivateNotes.GetHashCode(); hashCode = (hashCode * 397) ^ EstimatedHours.GetHashCode(); hashCode = (hashCode * 397) ^ SpentHours.GetHashCode(); hashCode = (hashCode * 397) ^ (CustomFields != null ? CustomFields.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CreatedOn.GetHashCode(); hashCode = (hashCode * 397) ^ UpdatedOn.GetHashCode(); hashCode = (hashCode * 397) ^ ClosedOn.GetHashCode(); hashCode = (hashCode * 397) ^ (Notes != null ? Notes.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AssignedTo != null ? AssignedTo.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ParentIssue != null ? ParentIssue.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FixedVersion != null ? FixedVersion.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IsPrivate.GetHashCode(); hashCode = (hashCode * 397) ^ TotalSpentHours.GetHashCode(); hashCode = (hashCode * 397) ^ TotalEstimatedHours.GetHashCode(); hashCode = (hashCode * 397) ^ (Journals != null ? Journals.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Changesets != null ? Changesets.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Attachments != null ? Attachments.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Relations != null ? Relations.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Children != null ? Children.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Uploads != null ? Uploads.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Watchers != null ? Watchers.GetHashCode() : 0); return(hashCode); } }
// // GET: /Recruiter/Details/5 public ViewResult Details(int id) { AssignedTo assignedto = db.AssignedToes.Single(a => a.AssignedID == id); return(View(assignedto)); }
public bool NotAssigned() { return(!AssignedTo.Any()); }
internal virtual bool IsOwner(Resource resource) { return(AssignedTo.Equals(resource)); }
public NameValueCollection BuildQueryString() { var col = new NameValueCollection(); if (MailBoxs != null && MailBoxs.Count > 0) { col.Add("mailbox", MailBoxs.ToCommaSeparated()); } if (Folder.HasValue()) { col.Add("folder", Folder); } if (Status != null) { col.Add("status", Status.ToString().ToLowerInvariant()); } if (Tags != null && Tags.Count > 0) { col.Add("tag", Tags.ToCommaSeparated()); } if (AssignedTo.HasValue()) { col.Add("assigned_to", AssignedTo); } if (ModifiedSince != null) { col.Add("modifiedSince", ModifiedSince.ToString()); } if (Number.HasValue()) { col.Add("number", Number); } if (SortField != null) { string field = null; switch (SortField) { case ConversationSortField.CreatedAt: field = "createdAt"; break; case ConversationSortField.CustomerEmail: field = "customerEmail"; break; case ConversationSortField.CustomerName: field = "customerName"; break; case ConversationSortField.MailboxId: field = "mailboxid"; break; case ConversationSortField.ModifiedAt: field = "modifiedAt"; break; case ConversationSortField.Number: field = "number"; break; case ConversationSortField.Score: field = "score"; break; case ConversationSortField.Status: field = "status"; break; case ConversationSortField.Subject: field = "subject"; break; } col.Add("sortField", field); } if (SortOrder != null) { string order = null; switch (SortOrder) { case HelpScout.SortOrder.Asc: order = "asc"; break; case HelpScout.SortOrder.Desc: default: order = "desc"; break; } col.Add("sortOrder", order); } if (SearchExpression.HasValue()) { col.Add("query", SearchExpression); } if (Page > 0) { col.Add("page", Page.ToString()); } if (CustomFields != null && CustomFields.Count > 0) { var allfields = CustomFields.ToPairs() .Select(a => $"{a.Key}:{a.Value}").ToList(); col.Add("customFieldsByIds", allfields.ToCommaSeparated()); } return(col); }
public void Assign(AssignedTo assignie) { _AssignedTo = assignie; _LastUpdatedTime = DateTime.Now; }
// // GET: /Recruiter/Delete/5 public ActionResult Delete(int id) { AssignedTo assignedto = db.AssignedToes.Single(a => a.AssignedID == id); return(View(assignedto)); }
public IQueryable <tblContacts> BuildQuery(CusRelDbContext context) { var priority = !string.IsNullOrWhiteSpace(Priority) ? Priority.PadRight(6, ' ') : null; var custZip = !string.IsNullOrWhiteSpace(CustZip) ? CustZip.PadRight(10, ' ') : null; var respondVia = !string.IsNullOrWhiteSpace(RespondVia) ? RespondVia.PadRight(12, ' ') : null; var vehNo = !string.IsNullOrWhiteSpace(VehNo) ? VehNo.PadRight(4, ' ') : null; var route = !string.IsNullOrWhiteSpace(Route) ? Route.PadRight(4, ' ') : null; var badge = !string.IsNullOrWhiteSpace(Badge) ? Badge.PadLeft(6, '0') : null; var assignedTo = !string.IsNullOrWhiteSpace(AssignedTo) ? AssignedTo.PadRight(16, ' ') : null; var ticketStatus = !string.IsNullOrWhiteSpace(TicketStatus) ? TicketStatus.PadRight(16, ' ') : null; if (ForAction == "") { ForAction = null; } if (LostItemCategory != null && LostItemCategory.Trim().ToLower() == "none") { LostItemCategory = null; } if (LostItemType != null && LostItemType.Trim().ToLower() == "none") { LostItemType = null; } if (RespondVia.NullableTrim().EnumParse(ResponseCriteriaVia.None) == ResponseCriteriaVia.None) { RespondVia = null; } if (string.IsNullOrWhiteSpace(Reasons)) { Reasons = null; } if (ExcludeTicketStatusList == null) // to avoid null checks { ExcludeTicketStatusList = new List <string>(); } if (IncludeTicketStatusList == null) // to avoid null checks { IncludeTicketStatusList = new List <string>(); } // support for DaysOpen if (ReceivedDateTime != null && ReceivedDateTime.Value.Date == ReceivedDateTime.Value && ReceivedDateTimeFrom == null && ReceivedDateTimeTo == null) { ReceivedDateTimeFrom = ReceivedDateTime.Value.Date; ReceivedDateTimeTo = ReceivedDateTime.Value.Date.AddDays(1); ReceivedDateTime = null; } IQueryable <tblContacts> result; if (!SearchAsUnion) { result = (from c in context.tblContacts where (FileNum == 0 || c.FileNum == FileNum) && (FeedbackId == null || FeedbackId == 0 || c.FeedbackId == FeedbackId.Value) //&& (ClerkId == null || c.ClerkId == ClerkId) && (UserId == null || c.UserId == UserId) && (ADAComplaint == null || c.ADAComplaint == ADAComplaint) && (SeniorComplaint == null || c.SeniorComplaint == SeniorComplaint) && (ContactSource == null || c.ContactSource == ContactSource) && (ReceivedDateTime == null || c.ReceivedDateTime == ReceivedDateTime.Value) && (Priority == null || c.Priority == priority) && (ResolvedDateTime == null || c.ResolvedDateTime == ResolvedDateTime.Value) && (FirstName == null || c.FirstName == FirstName) && (LastName == null || c.LastName == LastName) && (FullName == null || (c.FirstName.TrimEnd() + " " + c.LastName.TrimEnd()).Contains(FullName)) && (Addr1 == null || c.Addr1.Contains(Addr1)) && (Addr2 == null || c.Addr2.Contains(Addr2)) && (CustCity == null || c.CustCity == CustCity) && (CustState == null || c.CustState == CustState) && (CustZip == null || c.CustZip == custZip) && (HomePhone == null || c.HomePhone.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "").Replace("/", "").Replace("=", "").Contains(HomePhone)) && (WorkPhone == null || c.WorkPhone.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "").Replace("/", "").Replace("=", "").Contains(WorkPhone)) && (CellPhone == null || c.CellPhone.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "").Replace("/", "").Replace("=", "").Contains(CellPhone)) && (Email == null || c.Email.Contains(Email)) && (RespondVia == null || c.RespondVia == respondVia) && (IncidentDateTime == null || c.IncidentDateTime == IncidentDateTime.Value) && (VehNo == null || c.VehNo == vehNo) && (Route == null || c.Route == route) && (Destination == null || c.Destination.Contains(c.Destination)) && (Location == null || c.Location.Contains(Location)) && (IncidentCity == null || c.IncidentCity == IncidentCity) && (Badge == null || c.Badge == badge) && (OperatorName == null || c.OperatorName.Contains(OperatorName)) && (EmployeeDesc == null || c.EmployeeDesc.Contains(EmployeeDesc)) && (ResponseRequested == null || c.ResponseRequested == ResponseRequested) && (Division == null || c.Division == Division) && (CustComments == null || c.CustComments.Contains(CustComments)) && (AssignedTo == null || c.AssignedTo == assignedTo) && (ForAction == null || c.ForAction == ForAction) //&& (ContactStatus == null || c.ContactStatus == ContactStatus) && (TicketStatus == null || c.TicketStatus == ticketStatus) && (Resolution == null || c.Resolution == Resolution) && (ResolutionComment == null || c.ResolutionComment == ResolutionComment) && (updatedBy == null || c.updatedBy == updatedBy) && (updatedOn == null || c.updatedOn == updatedOn.Value) && (Reasons == null || c.Reasons.Contains(Reasons)) && (TitleVI == null || c.TitleVI == TitleVI) && (LostItemCategory == null || c.LostItemCategory == LostItemCategory) && (LostItemType == null || c.LostItemType == LostItemType) && (ReceivedDateTimeFrom == null || c.ReceivedDateTime >= ReceivedDateTimeFrom.Value) && (ReceivedDateTimeTo == null || c.ReceivedDateTime <= ReceivedDateTimeTo.Value) && (IncidentDateTimeFrom == null || c.IncidentDateTime >= IncidentDateTimeFrom.Value) && (IncidentDateTimeTo == null || c.IncidentDateTime <= IncidentDateTimeTo.Value) && (ExcludeTicketStatusList.Count == 0 || !ExcludeTicketStatusList.Contains(c.TicketStatus)) && (IncludeTicketStatusList.Count == 0 || IncludeTicketStatusList.Contains(c.TicketStatus)) select c); } else { result = (from c in context.tblContacts where (FileNum == 0 || c.FileNum == FileNum) && (FeedbackId == null || FeedbackId == 0 || c.FeedbackId == FeedbackId.Value) //&& (ClerkId == null || c.ClerkId == ClerkId) && (UserId == null || c.UserId == UserId) && ((ADAComplaint != null && c.ADAComplaint == ADAComplaint) || (SeniorComplaint != null && c.SeniorComplaint == SeniorComplaint) || (ContactSource != null && c.ContactSource == ContactSource) || (ReceivedDateTime != null && c.ReceivedDateTime == ReceivedDateTime.Value) || (Priority != null && c.Priority == priority) || (ResolvedDateTime != null && c.ResolvedDateTime == ResolvedDateTime.Value) || (FirstName != null && c.FirstName == FirstName) || (LastName != null && c.LastName == LastName) || (FullName != null && (c.FirstName.TrimEnd() + " " + c.LastName.TrimEnd()).Contains(FullName)) || (Addr1 != null && c.Addr1.Contains(Addr1)) || (Addr2 != null && c.Addr2.Contains(Addr2)) || (CustCity != null && c.CustCity == CustCity) || (CustState != null && c.CustState == CustState) || (CustZip != null && c.CustZip == custZip) || (HomePhone != null && c.HomePhone.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "").Replace("/", "").Replace("=", "").Contains(HomePhone)) || (WorkPhone != null && c.WorkPhone.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "").Replace("/", "").Replace("=", "").Contains(WorkPhone)) || (CellPhone != null && c.CellPhone.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "").Replace("/", "").Replace("=", "").Contains(CellPhone)) || (Email != null && c.Email.Contains(Email)) || (RespondVia != null && c.RespondVia == respondVia) || (IncidentDateTime != null && c.IncidentDateTime == IncidentDateTime.Value) || (VehNo != null && c.VehNo == vehNo) || (Route != null && c.Route == route) || (Destination != null && c.Destination.Contains(c.Destination)) || (Location != null && c.Location.Contains(Location)) || (IncidentCity != null && c.IncidentCity == IncidentCity) || (Badge != null && c.Badge == badge) || (OperatorName != null && c.OperatorName.Contains(OperatorName)) || (EmployeeDesc != null && c.EmployeeDesc.Contains(EmployeeDesc)) || (ResponseRequested != null && c.ResponseRequested == ResponseRequested) || (Division != null && c.Division == Division) || (CustComments != null && c.CustComments.Contains(CustComments)) || (AssignedTo != null && c.AssignedTo == assignedTo) || (ForAction != null && c.ForAction == ForAction) || (TicketStatus != null && c.TicketStatus == ticketStatus) || (Resolution != null && c.Resolution == Resolution) || (ResolutionComment != null && c.ResolutionComment == ResolutionComment) || (updatedBy != null && c.updatedBy == updatedBy) || (updatedOn != null && c.updatedOn == updatedOn.Value) || (Reasons != null && c.Reasons.Contains(Reasons)) || (TitleVI != null && c.TitleVI == TitleVI) || (LostItemCategory != null && c.LostItemCategory == LostItemCategory) || (LostItemType != null && c.LostItemType == LostItemType) ) && (ReceivedDateTimeFrom == null || c.ReceivedDateTime >= ReceivedDateTimeFrom.Value) && (ReceivedDateTimeTo == null || c.ReceivedDateTime <= ReceivedDateTimeTo.Value) && (IncidentDateTimeFrom == null || c.IncidentDateTime >= IncidentDateTimeFrom.Value) && (IncidentDateTimeTo == null || c.IncidentDateTime <= IncidentDateTimeTo.Value) && (ExcludeTicketStatusList.Count == 0 || !ExcludeTicketStatusList.Contains(c.TicketStatus)) && (IncludeTicketStatusList.Count == 0 || IncludeTicketStatusList.Contains(c.TicketStatus)) select c); } return(IsForwardOrder ? result.OrderBy(t => t.FileNum) : result.OrderByDescending(t => t.FileNum)); }
public void Add(MountedCourse type) { lock (type) { if (Count == MountedCoureId.Length) { var newLength = MountedCoureId.Length + 1000; var _MountedCoureId = new string[newLength]; MountedCoureId.CopyTo(_MountedCoureId); MountedCoureId = _MountedCoureId; var _EnrollmentOption = new string[newLength]; EnrollmentOption.CopyTo(_EnrollmentOption); EnrollmentOption = _EnrollmentOption; var _Level = new string[newLength]; Level.CopyTo(_Level); Level = _Level; var _MaxLimit = new int[newLength]; MaxLimit.CopyTo(_MaxLimit); MaxLimit = _MaxLimit; var _MinLimit = new int[newLength]; MinLimit.CopyTo(_MinLimit); MinLimit = _MinLimit; var _Semester = new string[newLength]; Semester.CopyTo(_Semester); Semester = _Semester; var _AcademicYear = new string[newLength]; AcademicYear.CopyTo(_AcademicYear); AcademicYear = _AcademicYear; var _ProgramId = new string[newLength]; ProgramId.CopyTo(_ProgramId); ProgramId = _ProgramId; var _AssignedBy = new string[newLength]; AssignedBy.CopyTo(_AssignedBy); AssignedBy = _AssignedBy; var _Date = new System.DateTime[newLength]; Date.CopyTo(_Date); Date = _Date; var _CourseName = new string[newLength]; CourseName.CopyTo(_CourseName); CourseName = _CourseName; var _CourseCode = new string[newLength]; CourseCode.CopyTo(_CourseCode); CourseCode = _CourseCode; var _AssignedTo = new string[newLength]; AssignedTo.CopyTo(_AssignedTo); AssignedTo = _AssignedTo; var _Specialization = new string[newLength]; Specialization.CopyTo(_Specialization); Specialization = _Specialization; var _Category = new string[newLength]; Category.CopyTo(_Category); Category = _Category; var _Scoring = new bool[newLength]; Scoring.CopyTo(_Scoring); Scoring = _Scoring; var _Credit = new int[newLength]; Credit.CopyTo(_Credit); Credit = _Credit; } MountedCoureId.Span[Count] = type.MountedCoureId; EnrollmentOption.Span[Count] = type.EnrollmentOption; Level.Span[Count] = type.Level; MaxLimit.Span[Count] = type.MaxLimit; MinLimit.Span[Count] = type.MinLimit; Semester.Span[Count] = type.Semester; AcademicYear.Span[Count] = type.AcademicYear; ProgramId.Span[Count] = type.ProgramId; AssignedBy.Span[Count] = type.AssignedBy; Date.Span[Count] = type.Date; CourseName.Span[Count] = type.CourseName; CourseCode.Span[Count] = type.CourseCode; AssignedTo.Span[Count] = type.AssignedTo; Specialization.Span[Count] = type.Specialization; Category.Span[Count] = type.Category; Scoring.Span[Count] = type.Scoring; Credit.Span[Count] = type.Credit; Count++; } }