本文整理汇总了C#中Quote.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Quote.Save方法的具体用法?C# Quote.Save怎么用?C# Quote.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quote
的用法示例。
在下文中一共展示了Quote.Save方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssignQuote
public void AssignQuote(int QuoteId, int newUserId)
{
Quote q = new Quote(QuoteId);
q.OwnerId = newUserId;
q.Save();
return;
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
int quoteId = Convert.ToInt32(Request.Params["quote_id"]);
Quote quote = new Quote(quoteId);
// Remove the old items from this quote
quote.ClearItems();
// Get the new quote items, will be a JSON array in the POST field
string quoteItemsString = Request.Params["quote_items"];
if ( String.IsNullOrEmpty(Request.Params["quote_items"]) || String.IsNullOrEmpty(Request.Params["quote_id"])){
Response.StatusCode = 500;
Response.End();
}
// Deserialise the JSON into QuoteItem objects and create each one (insert into DB)
JavaScriptSerializer jsl = new JavaScriptSerializer();
List<QuoteItem> quoteItems =(List<QuoteItem>)jsl.Deserialize(quoteItemsString, typeof(List<QuoteItem>));
foreach (QuoteItem item in quoteItems)
item.Create();
// Get the quote and update the fields from the form on the ViewQuote page.
quote.Revision++;
quote.DiscountPercent = Convert.ToDouble(Request.Params["discount_percent"]);
quote.DiscountPercent24 = Convert.ToDouble(Request.Params["discount_percent_24"]);
quote.DiscountPercent36 = Convert.ToDouble(Request.Params["discount_percent_36"]);
quote.DiscountPercentSetup = Convert.ToDouble(Request.Params["discount_percent_setup"]);
quote.DiscountWritein = Convert.ToDouble(Request.Params["discount_writein"]);
quote.Title = Request.Params["title"];
quote.LastChange = DateTime.Now;
quote.Save();
}
示例3: MakeQuoteTemplate
public void MakeQuoteTemplate(int QuoteId)
{
Quote q = new Quote(QuoteId);
q.Status = "template";
q.Save();
return;
}
示例4: Insert
public void Insert(decimal? SellAmount,int? SellCurrency,decimal? BuyAmount,int? BuyCurrency,decimal? Rate,decimal? ServiceFee,DateTime? PromisedDeliveryDate,DateTime? ActualDeliveryDate,DateTime DateCreated,int? Timing)
{
Quote item = new Quote();
item.SellAmount = SellAmount;
item.SellCurrency = SellCurrency;
item.BuyAmount = BuyAmount;
item.BuyCurrency = BuyCurrency;
item.Rate = Rate;
item.ServiceFee = ServiceFee;
item.PromisedDeliveryDate = PromisedDeliveryDate;
item.ActualDeliveryDate = ActualDeliveryDate;
item.DateCreated = DateCreated;
item.Timing = Timing;
item.Save(UserName);
}
示例5: Update
public void Update(int QuotesKey,decimal? SellAmount,int? SellCurrency,decimal? BuyAmount,int? BuyCurrency,decimal? Rate,decimal? ServiceFee,DateTime? PromisedDeliveryDate,DateTime? ActualDeliveryDate,DateTime DateCreated,int? Timing)
{
Quote item = new Quote();
item.MarkOld();
item.IsLoaded = true;
item.QuotesKey = QuotesKey;
item.SellAmount = SellAmount;
item.SellCurrency = SellCurrency;
item.BuyAmount = BuyAmount;
item.BuyCurrency = BuyCurrency;
item.Rate = Rate;
item.ServiceFee = ServiceFee;
item.PromisedDeliveryDate = PromisedDeliveryDate;
item.ActualDeliveryDate = ActualDeliveryDate;
item.DateCreated = DateCreated;
item.Timing = Timing;
item.Save(UserName);
}