예제 #1
0
        private void Form6_Load(object sender, EventArgs e)
        {
            System.Globalization.CultureInfo language = new System.Globalization.CultureInfo("en-us");
            InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(language);

            dgvContainer.AutoGenerateColumns = false;
            dgvKala.AutoGenerateColumns      = false;

            if (CTR.GetAllData().Count > 0)
            {
                dgvContainer.DataSource = CTR.GetAllData();
            }

            gbKalaStatus();
            if (dgvKala.Enabled)
            {
                dgvKala.DataSource = CONN.GetAllData();
            }

            cmbBlNo.DataSource    = BOL.GetAllData();
            cmbBlNo.DisplayMember = "txt2";
            cmbBlNo.ValueMember   = "ID";

            cmb07.DataSource    = PackageCodes.GetAllData();
            cmb07.DisplayMember = "Full";
            cmb07.ValueMember   = "Code";

            cmb07.Text = "";

            loadTooltips();
        }
예제 #2
0
        private void Form6_Load(object sender, EventArgs e)
        {
            System.Globalization.CultureInfo language = new System.Globalization.CultureInfo("en-us");
            InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(language);

            Screen scr = Screen.PrimaryScreen;

            Left = (scr.WorkingArea.Width - Width) / 2;
            Top  = (scr.WorkingArea.Height - Height) / 2;

            switch (Mode)
            {
            case 1:     //Truck
                cmbCtr3.Text    = "45'   Truck - 15500";
                chkFake.Visible = true;
                break;

            case 2:     //Ship
                GroupBox1.Text  = "اطلاعات کانتینر دریایی";
                cmbCtr3.Text    = "2200";
                txtCtr1.Text    = "";
                txtCtr1.Enabled = true;
                txtCtr2.Enabled = true;
                cmbCtr3.Enabled = true;
                txtCtr4.Enabled = true;
                break;

            case 3:     //Air
                GroupBox1.Text = "اطلاعات کانتینر هوایی";

                cmbCtr3.Enabled = false;
                cmbCtr3.Text    = "0";
                break;

            default:
                break;
            }

            dgv.AutoGenerateColumns = false;
            dgv.DataSource          = CONN.GetAllDataSortedByBolNo();

            cmbBlNo.DataSource    = BOL.GetAllData();
            cmbBlNo.DisplayMember = "txt2";
            cmbBlNo.ValueMember   = "ID";

            cmb07.DataSource    = PackageCodes.GetAllData();
            cmb07.DisplayMember = "Full";
            cmb07.ValueMember   = "Code";

            cmb07.Text = "";
        }