public void SubmitNewBuyFactor() { Sell_factor jadid = new Sell_factor(); jadid.seller_company = Combo_sherkat.SelectedItem.ToString(); jadid.sell_price = int.Parse(txt_sellprice.Text); jadid.product_name = Combo_kala.SelectedItem.ToString(); jadid.unit = lbl_unit.Text; jadid.buy_price = int.Parse(txt_buyprice.Text); jadid.description = txt_description.Text; jadid.amount = int.Parse(txt_amount.Text); jadid.sum_finance = ((int.Parse(txt_sellprice.Text)) - (int.Parse(txt_buyprice.Text)) - (int.Parse(txt_discount.Text))) * (int.Parse(txt_amount.Text)); jadid.date = date_date.SelectedDate; jadid.discount = int.Parse(txt_discount.Text); db.Sell_factors.InsertOnSubmit(jadid); db.SubmitChanges(); Dg_1.ItemsSource = db.Sell_factors; }
partial void DeleteSell_factor(Sell_factor instance);
partial void UpdateSell_factor(Sell_factor instance);
partial void InsertSell_factor(Sell_factor instance);