using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// از این کلاس برای درج اطلاعات مربوط به جزئیات سفارش استفاده می شود
/// </summary>
public class Class_tblOrderDetails
{
    Decimal Dec_OrderID = 0;
    Decimal Dec_AssetID = 0;
    float Flt_AssetQuantity = 0;
    String Str_OrderDetailNotes = String.Empty;

    public Class_tblOrderDetails(Decimal Dec_OrderID, Decimal Dec_AssetID, float Flt_AssetQuantity, String Str_OrderDetailNotes)
	{
        this.Dec_OrderID = Dec_OrderID;
        this.Dec_AssetID = Dec_AssetID;
        this.Flt_AssetQuantity = Flt_AssetQuantity;
        this.Str_OrderDetailNotes = Str_OrderDetailNotes;
	}

    public void UDF_SaveOrderDetails()
    {
        LSC_WareHouseDataContext db = new LSC_WareHouseDataContext();
        tblOrderDetail tblOdrDtl = new tblOrderDetail();
        tblOdrDtl.OrderID = this.Dec_OrderID;
        tblOdrDtl.AssetID = this.Dec_AssetID;
        tblOdrDtl.AssetQuantity = this.Flt_AssetQuantity;
        tblOdrDtl.OrderDetailNotes = this.Str_OrderDetailNotes;
        tblOdrDtl.TahvilBit = Boolean.Parse("false");
        tblOdrDtl.PurchasedBit = Boolean.Parse("false");
        tblOdrDtl.MarjoeeBit = Boolean.Parse("false");


        db.tblOrderDetails.InsertOnSubmit(tblOdrDtl);
        db.SubmitChanges();

    }
}
