public void GetSalesInvDetails(string invno) { var tasaldetail = new DsInventoryTableAdapters.SALESINVDETAILTableAdapter(); tasaldetail.Connection.ConnectionString = _constr; salesinvdetailData = new DsInventory.SALESINVDETAILDataTable(); tasaldetail.FillBySINVNO(salesinvdetailData, invno); }
public void GetNonSaleInv() { var tasalMain = new DsInventoryTableAdapters.SALESMAINTableAdapter {Connection = {ConnectionString = _constr}}; var tasaldetail = new DsInventoryTableAdapters.SALESINVDETAILTableAdapter {Connection = {ConnectionString = _constr}}; var ds = new DsInventory(); tasalMain.FillByNonPost(ds.SALESMAIN, Environment.MachineName); if (ds.SALESMAIN.Rows.Count > 0) { salesmainRow = ds.SALESMAIN[0]; var sinvno = salesmainRow[0].ToString(); try { tasaldetail.FillBySINVNO(ds.SALESINVDETAIL, sinvno); salesinvdetailData = ds.SALESINVDETAIL; } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.ToString()); } } }
public void GetNonSaleInv() { var bl = new SalesManger(); bl.GetNonSaleInv(); SalesmainRow = bl.salesmainRow; Salesinvdetail = bl.salesinvdetailData; }
public string DeleteSalesInvDetail(string salesinv) { SqlTransaction tran = null; var retval = "0"; try { var cn = new SqlConnection(_constr); var salesinvdet = new DsInventory.SALESINVDETAILDataTable(); cn.Open(); tran = cn.BeginTransaction(IsolationLevel.ReadUncommitted); var ta = new DsInventoryTableAdapters.SALESINVDETAILTableAdapter(); var ta1 = new DsInventoryTableAdapters.SALESINVDETAILTableAdapter(); ta1.Connection.ConnectionString = _constr; ta1.FillBySINVNO(salesinvdet, salesinv); ta.AssignConnection(cn, tran); foreach (DsInventory.SALESINVDETAILRow dRow in salesinvdet.Rows) { DoSalesItemDelete(dRow, ref cn, ref tran); } ta.DeleteSalesInvDetail(salesinv); tran.Commit(); retval = "1"; } catch (Exception ex) { retval = ex.ToString(); tran.Rollback(); } return retval; }
public void GetSalesInvDetail(string sinvno) { var bl = new SalesManger(); bl.GetSalesInvDetails(sinvno); Salesinvdetail = bl.salesinvdetailData; }