当前位置: 首页>>代码示例>>C#>>正文


C# Quote.Save方法代码示例

本文整理汇总了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;
 }
开发者ID:tonybaloney,项目名称:No-More-Spreadsheets,代码行数:7,代码来源:QuoteService.cs

示例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();
    }
开发者ID:tonybaloney,项目名称:No-More-Spreadsheets,代码行数:32,代码来源:SaveQuote.aspx.cs

示例3: MakeQuoteTemplate

 public void MakeQuoteTemplate(int QuoteId)
 {
     Quote q = new Quote(QuoteId);
     q.Status = "template";
     q.Save();
     return;
 }
开发者ID:tonybaloney,项目名称:No-More-Spreadsheets,代码行数:7,代码来源:QuoteService.cs

示例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);
        }
开发者ID:Lornestar,项目名称:pfx,代码行数:26,代码来源:QuoteController.cs

示例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);
        }
开发者ID:Lornestar,项目名称:pfx,代码行数:30,代码来源:QuoteController.cs


注:本文中的Quote.Save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。