public crmContractDeal RegisterDeal() { crmContractDeal rd; switch (KindOfDeal) { // case KindOfDeal.DEAL_LONG_SERVICE: // rd = new crmDealLongService(this.Session); // break; case KindOfDeal.DEAL_WITH_STAGE: rd = new crmDealWithStage(this.Session); break; case KindOfDeal.DEAL_WITHOUT_STAGE: rd = new crmDealWithoutStage(this.Session); break; default: throw new ArgumentException("Unknown Kind Of Deal", "KindOfDeal"); } //rd.DateRegistration = this.DateRegistration; rd.CuratorDepartment = this.CuratorDepartment; rd.Category = this.Category; rd.Current.DateBegin = this.DateBegin; rd.Current.DateEnd = this.DateEnd; rd.Current.DateFinish = this.DateFinish; rd.Current.DescriptionShort = this.DescriptionShort; rd.Current.Price = this.Price; rd.Current.Valuta = this.Valuta; if (this.OurRole == PartyRole.CUSTOMER) { rd.Customer = this.OurParty.Party; rd.Supplier = this.PartnerParty.Party; } else { rd.Supplier = this.OurParty.Party; rd.Customer = this.PartnerParty.Party; } return(rd); }
protected void ReloadDealInfos(DealInfoDealType deal_type, crmDealWithoutStage deal) { ReloadDealInfos(deal_type, deal, ((crmDealWithoutStageVersion)deal.Current).DeliveryPlan); ReloadDealInfos(deal_type, deal, ((crmDealWithoutStageVersion)deal.Current).PaymentPlan); }