Exemplo n.º 1
0
        public AddRealize(DataSetTpos.productRow productRow, DataSetTpos.fakturaRow faktRow)
        {
            prRow = productRow;
            fkRow = faktRow;

            InitializeComponent();
            string sum = "0";

            //tbxPack.isFloat = true;
            tbxSoldPrice.isFloat   = true;
            tbxPricePrixod.isFloat = true;

            if (DBclass.DS.balanceview.Rows.Count > 0)
            {
                DataRow[] blncs = DBclass.DS.balanceview.Select("prodId = " + prRow.productId);
                if (blncs.Length > 0)
                {
                    sum = ((DataSetTpos.balanceviewRow)blncs[0]).endCount;
                }
            }

            lblAllCount.Text = sum;
            DataView dv = new DataView(DBclass.DS.provider);

            dv.RowFilter     = "providerId = " + fkRow.providerId.ToString();
            providerLbl.Text = dv[0]["orgName"].ToString();
            tbxPack.isFloat  = true;
            tbxName.Text     = productRow.name;
            tbxPack.Text     = 1.ToString();

            pack = productRow.pack;

            tbxPricePrixod.Text = "0";
            tbxShtrix.Text      = productRow.barcode;
            //tbxSoldPrice.Text = productRow.price.ToString();

            DataSetTposTableAdapters.realizeviewTableAdapter rlvda = new DataSetTposTableAdapters.realizeviewTableAdapter();
            DataSetTpos.realizeviewDataTable tablerlv = new DataSetTpos.realizeviewDataTable();
            rlvda.FillByID(tablerlv, productRow.productId);
            tbxPricePrixod.Text = (tablerlv.Rows.Count > 0 ? (tablerlv.Rows[0] as DataSetTpos.realizeviewRow).fakturaPrice.ToString() : "0");


            if (productRow.barcode != null)
            {
                tbxShtrix.Text = productRow.barcode;
            }
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            if (productRow.pack == 0 || productRow.pack == 1)
            {
                tbxKol.Visible = false;
                lblKol.Visible = false;
            }
        }
Exemplo n.º 2
0
        public AddRealize(DataSetTpos.productRow productRow, DataSetTpos.fakturaRow faktRow)
        {
            prRow = productRow;
            fkRow = faktRow;

            InitializeComponent();

            tbxName.Text = productRow.name;
            tbxPack.Text = 1.ToString();
            pack         = productRow.pack;
            //tbxPricePrixod.Text = productRow.price.ToString();
            tbxShtrix.Text = productRow.barcode;
            if (productRow.barcode != null)
            {
                tbxShtrix.Text = productRow.barcode;
            }
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            if (productRow.pack == 0 || productRow.pack == 1)
            {
                tbxKol.Visible = false;
                lblKol.Visible = false;
            }
        }