protected selling_history Converttosellinghistory(ProductSellingEntity ob) { selling_history temphistory = new selling_history(); temphistory.dealer_id = null; temphistory.product_id = ob.ProductId; temphistory.quantity = ob.Quantity; temphistory.credit = ob.Amount; temphistory.debit = 0; temphistory.transaction_type = (int)InventoryHelper.TransactionType.Credit; temphistory.customer_info = CustomerInfo; temphistory.payment_type = PaymentType.Content == null ? "" : PaymentType.Content.ToString(); temphistory.payment_date = DateTime.Now; temphistory.customer_name = CustomerName; temphistory.remarks = Remarks; return temphistory; }
protected ProductSellingEntity CoverttoProductSellingEntity(product ob) { ProductSellingEntity tempproduct = new ProductSellingEntity(); tempproduct.ProductId = ob.id; tempproduct.ProductName = ob.product_name; tempproduct.Quantity = Quantity; tempproduct.SellingPrice = ob.sell_price; tempproduct.Amount = tempproduct.SellingPrice * Quantity; return tempproduct; }