Ejemplo n.º 1
0
 public void GetSalesInvDetails(string invno)
 {
     var tasaldetail = new DsInventoryTableAdapters.SALESINVDETAILTableAdapter();
     tasaldetail.Connection.ConnectionString = _constr;
     salesinvdetailData = new DsInventory.SALESINVDETAILDataTable();
     tasaldetail.FillBySINVNO(salesinvdetailData, invno);
 }
Ejemplo n.º 2
0
        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());
                }

            }
        }
Ejemplo n.º 3
0
 public void GetNonSaleInv()
 {
     var bl = new SalesManger();
     bl.GetNonSaleInv();
     SalesmainRow = bl.salesmainRow;
     Salesinvdetail = bl.salesinvdetailData;
 }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
 public void GetSalesInvDetail(string sinvno)
 {
     var bl = new SalesManger();
     bl.GetSalesInvDetails(sinvno);
     Salesinvdetail = bl.salesinvdetailData;
 }