Ejemplo n.º 1
0
        public CurrPosition()
        {
            InitializeComponent();

            myC01 = new C01();
            myFC0 = new FC0();
            myOC0 = new OC0();

            foreach (string acc in MainForm.AccList.Keys)
            {
                cmb_AccNum.Items.Add(acc);
            }
            if (cmb_AccNum.Items.Count > 0)
            {
                cmb_AccNum.SelectedIndex = 0;
            }

            table = new DataTable();
            dataGridView1.DataSource = table;

            string[] name       = Enum.GetNames(typeof(ColumnName));
            string[] headertext = Enum.GetNames(typeof(ColumnText));

            for (int i = 0; i < name.Length; i++)
            {
                table.Columns.Add(name[i]);
                dataGridView1.Columns[i].HeaderText = headertext[i];
            }

            table.Columns["jqty"].DataType     = typeof(double);
            table.Columns["pamt"].DataType     = typeof(double);
            table.Columns["price"].DataType    = typeof(double);
            table.Columns["appamt"].DataType   = typeof(double);
            table.Columns["dtsunik1"].DataType = typeof(double);
            table.Columns["sunikrt"].DataType  = typeof(double);

            dataGridView1.Columns["expcode"].DefaultCellStyle.Alignment  = DataGridViewContentAlignment.MiddleCenter;
            dataGridView1.Columns["medosu"].DefaultCellStyle.Alignment   = DataGridViewContentAlignment.MiddleCenter;
            dataGridView1.Columns["jqty"].DefaultCellStyle.Alignment     = DataGridViewContentAlignment.MiddleRight;
            dataGridView1.Columns["jqty"].DefaultCellStyle.Format        = "#,0";
            dataGridView1.Columns["pamt"].DefaultCellStyle.Alignment     = DataGridViewContentAlignment.MiddleRight;
            dataGridView1.Columns["pamt"].DefaultCellStyle.Format        = "0.00";
            dataGridView1.Columns["price"].DefaultCellStyle.Alignment    = DataGridViewContentAlignment.MiddleRight;
            dataGridView1.Columns["price"].DefaultCellStyle.Format       = "0.00";
            dataGridView1.Columns["appamt"].DefaultCellStyle.Alignment   = DataGridViewContentAlignment.MiddleRight;
            dataGridView1.Columns["appamt"].DefaultCellStyle.Format      = "#,0";
            dataGridView1.Columns["dtsunik1"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            dataGridView1.Columns["dtsunik1"].DefaultCellStyle.Format    = "#,0";
            dataGridView1.Columns["sunikrt"].DefaultCellStyle.Alignment  = DataGridViewContentAlignment.MiddleRight;
            dataGridView1.Columns["sunikrt"].DefaultCellStyle.Format     = "#.#0";

            this.Show();
            MainForm.LoadedForm.Add(this);
        }
Ejemplo n.º 2
0
        public CurrPrice()
        {
            InitializeComponent();

            myFH0 = new FH0();
            myFC0 = new FC0();
            myOH0 = new OH0();
            myOC0 = new OC0();

            this.Show();
            MainForm.LoadedForm.Add(this);
        }