public static void UpdateQuotationFinishDate(String _QuoteID, DateTime date) { QuotationMaster QM = eQuotationContext.Current.QuotationMaster.Where(d => d.quoteId.Equals(_QuoteID, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); if (QM != null) { QM.QuotationExtensionNew.FinishDate = date; eQuotationContext.Current.SaveChanges(); } }
public static void UpdateQuotationStatus(String _QuoteID, OrderStatus _Status) { QuotationMaster QM = eQuotationContext.Current.QuotationMaster.Where(d => d.quoteId.Equals(_QuoteID, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); if (QM != null) { QM.DOCSTATUS = (int)_Status; eQuotationContext.Current.SaveChanges(); } }
public Quote(QuotationMaster master) { this.QuoteID = master.quoteId; this.QuoteNo = master.quoteNo; this.CustomID = master.customId; this.AttentionEmail = master.attentionEmail; this.CreatedDate = master.createdDate; this.ExpiredDate = master.expiredDate; this.TotalAmount = master.Revenue; this.QuoteItems = master.QuotationDetail.Select(p => new QuoteItem(p)).ToList(); this.QuotePartners = master.QuotationPartner; this.DoctStatus = master.DOCSTATUS; this.Currency = master.currency; this.Tax = master.tax; this.Org = master.org; }
public bool InitQuotationApprovalExpirationFlow(string QuoteID, ref string msg) { QuotationMaster _QuotationMaster = eQuotationContext.Current.QuotationMaster.Find(QuoteID); if (_QuotationMaster.QuoteExtensionX.ApprovalFlowTypeX == eQApprovalFlowType.ThirtyDaysExpiration) { string officecode; string groupcode; eQuotationDAL _eQuotationDAL = new eQuotationDAL(); getOfficeGroupByEripIdOrg(_QuotationMaster.quoteToRowId, _QuotationMaster.quoteToErpId, _QuotationMaster.org, out officecode, out groupcode, ref msg); IEnumerable <GPBLOCK_LOGIC> _ApproverList = getApproverList(officecode, groupcode, ref msg); if (_ApproverList != null) { eQuotationContext.Current.Database.ExecuteSqlCommand(string.Format("delete from Quotation_Approval_Expiration where quoteID='{0}'", QuoteID)); //eQuotationContext.Current.SaveChanges(); int i = 1; foreach (GPBLOCK_LOGIC gp in _ApproverList) { Quotation_Approval_Expiration qae = new Quotation_Approval_Expiration(); qae.QuoteID = QuoteID; qae.GPlever = gp.gp_level; qae.Approver = gp.approver; qae.ApprovalLevel = i; qae.Status = 0; qae.MobileApproveYes = System.Guid.NewGuid().ToString(); qae.MobileApproveNo = System.Guid.NewGuid().ToString(); qae.ApprovalDate = null; qae.ApprovalFrom = ""; qae.ApprovalFlowType = "ThirtyDaysExpiration"; qae.CreatedDate = DateTime.Now; i++; eQuotationContext.Current.Entry(qae).State = System.Data.Entity.EntityState.Added; } eQuotationContext.Current.SaveChanges(); } } return(true); }