GetInt32() public method

public GetInt32 ( int ordinal ) : int
ordinal int
return int
 private void FillComDebitBillIdIsFalse()
 {
     this.selectlocalbillTableAdapter.Fill(this.lclsupset.selectlocalbill);
     DataTable table = this.lclsupset.Tables["selectlocalbill"];
     DataTableReader read = new DataTableReader(table);
     comboDebitBillNumber.Properties.Items.Clear();
     while (read.Read())
     {
         comboDebitBillNumber.Properties.Items.Add(read.GetInt32(1).ToString());
     }
 }
        private void SupLocalBillRecieved_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'lclsupset.selectlocalbill' table. You can move, or remove it, as needed.
            this.selectlocalbillTableAdapter.Fill(this.lclsupset.selectlocalbill);
            DataTable table = this.lclsupset.Tables["selectlocalbill"];
            DataTableReader read = new DataTableReader(table);
            while (read.Read())
            {
                comboDebitBillNumber.Properties.Items.Add(read.GetInt32(1).ToString());
            }

        }
示例#3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'MyDataBaseDataSet1.mainbilll' table. You can move, or remove it, as needed.
            this.mainbilllTableAdapter.Fill(this.MyDataBaseDataSet1.mainbilll);
            DataTable table = this.MyDataBaseDataSet1.Tables[1];

            DataTableReader read = new DataTableReader(table);
            while (read.Read())
            {
                comboBox1.Items.Add(read.GetInt32(0));
            }
            read.Close();
            this.reportViewer1.RefreshReport();

            //Microsoft.Reporting.WinForms.ReportPageSettings settings = this.reportViewer1.LocalReport.GetDefaultPageSettings();
            //settings.Margins.Bottom = 25;
            //settings.Margins.Top = 25;
            //settings.Margins.Left = 25;
            //settings.Margins.Right = 25;
            //Microsoft.Reporting.WinForms.
           

        }
示例#4
0
        // ----------------------------------------------
        // PRIVATE MEMBERS
        // ----------------------------------------------
        /// <summary>
        /// [PRIVATE] Fill a static from table reader
        /// </summary>
        /// <param name="oDT"></param>
        /// <returns></returns>
        private Static _FillStaticFromTableReader(DataTableReader oDT)
        {
            Static stc = new Static();

            stc.Tag = (oDT.IsDBNull(oDT.GetOrdinal("tag")) ? "" : oDT["tag"].ToString());
            stc.Type = (oDT.IsDBNull(oDT.GetOrdinal("type")) ? "" : oDT["type"].ToString());
            stc.Content = (oDT.IsDBNull(oDT.GetOrdinal("content")) ? "" : oDT["content"].ToString());
            stc.Value = (oDT.IsDBNull(oDT.GetOrdinal("value")) ? "" : oDT["value"].ToString());
            stc.Length = oDT.IsDBNull(oDT.GetOrdinal("length")) ? 0 : oDT.GetInt32(oDT.GetOrdinal("length"));

            return stc;
        }
 public void FillDebitBillComboBox()
 {
     comboDebitBillNumber.Properties.Items.Clear();
     DataTable table = this.zmaindataset.Tables["billRcv"];
     DataTableReader read = new DataTableReader(table);
     while (read.Read())
     {
         comboDebitBillNumber.Properties.Items.Add(read.GetInt32(2).ToString());
     }
 }
示例#6
0
		public void DontSeeTheEarlierRowsTest ()
		{
                        DataTableReader reader = new DataTableReader (dt);
                        try {
                                reader.Read (); // first row
                                reader.Read (); // second row

                                // insert a row at position 0
                                DataRow r = dt.NewRow ();
                                r [0] = 0;
                                r [1] = "adhi bagavan";
                                dt.Rows.InsertAt (r, 0);
                        
                                Assert.AreEqual (2, (int) reader.GetInt32 (0), "#1 should not alter the position");
                        } finally {
                                if (reader != null && !reader.IsClosed)
                                        reader.Close ();
                        }
		}
示例#7
0
                public void GetTest ()
                {
                        dt.Columns.Add ("nullint", typeof (int));
                        dt.Rows [0] ["nullint"] = 333;

                        DataTableReader reader = new DataTableReader (dt);
                        try {
                                reader.Read ();
                        
                                int ordinal = reader.GetOrdinal ("nullint");
                                // Get by name
                                Assert.AreEqual (1, (int) reader ["id"], "#1 should be able to get by name");
                                Assert.AreEqual (333, reader.GetInt32 (ordinal), "#2 should get int32");
                                Assert.AreEqual ("System.Int32", reader.GetDataTypeName (ordinal), "#3 data type should match");
                        } finally {
                                if (reader != null && !reader.IsClosed)
                                        reader.Close ();
                        }
                }
示例#8
0
        private void checkUnPaidBills_CheckedChanged(object sender, EventArgs e)
        {
            if (checkUnPaidBills.Checked == true)
            {

                this.mainbillTableAdapter.Fill(this.maindataset.mainbill);
                DataTable table = this.maindataset.Tables["mainbill"];
                DataTableReader read = new DataTableReader(table);
                while (read.Read())
                {
                    comboDebitBillNumber.Properties.Items.Add(read.GetInt32(3).ToString());
                }
            }
        }
示例#9
0
        private void WhenBillPaidIsChecked()
        {
            comboDebitBillNumber.Properties.Items.Clear();

            this.mainbillTableAdapter.FillBySelectAllPaid(this.maindataset.mainbill);
            DataTable table = this.maindataset.Tables["mainbill"];
            DataTableReader read = new DataTableReader(table);
            while (read.Read())
            {
                comboDebitBillNumber.Properties.Items.Add(read.GetInt32(3).ToString());
            }
        }
示例#10
0
        private void FillComDebitbillIdsIsTrue()
        {
            comboDebitBillNumber.Properties.Items.Clear();

            this.zmainbillTableAdapter.FillBySelectAll(this.zmaindataset.zmainbill);
            DataTable table = this.zmaindataset.Tables["zmainbill"];
            DataTableReader read = new DataTableReader(table);
            while (read.Read())
            {
                comboDebitBillNumber.Properties.Items.Add(read.GetInt32(3).ToString());
            }
        }