Exemplo n.º 1
0
 private void Year_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         //this.Parent.Parent.Parent.Parent.GetNextControl(this, true).Focus();
         //if (e.KeyCode == Keys.Enter)
         //    SendKeys.Send("{TAB}");
         if (e.KeyCode == Keys.Enter)
         {
             if (NextControl != null && NextControl.Visible && NextControl.Enabled)
             {
                 NextControl.Focus();
             }
             else if (NextControl != null && (!NextControl.Visible | !NextControl.Enabled))
             {
                 SendKeys.Send("{TAB}");
             }
         }
         else
         {
             CheckKeyUpDown(e, Year, 2200);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
        public frmBomFind()
        {
            InitializeComponent();

            clsTranslate obj_ctl = new clsTranslate(this.Controls, DBUtility._language);

            obj_ctl.Translate();

            str_language = DBUtility._language;
            NextControl oNext = new NextControl(this, "1");

            oNext.EnterToTab();

            objToolbar = new clsToolBar(this.Tag.ToString(), this.Controls);
            objToolbar.Set_Button_Image(toolStrip1);

            DataTable dtDept = clsApp.GetDataTable(@"SELECT id as dep_id,(id +'[' + name+']') AS dep_cdesc FROM dbo.bs_department with(nolock) WHERE state='0'");
            DataRow   dr1    = dtDept.NewRow(); //插一空行

            dr1["dep_id"] = "";
            dtDept.Rows.InsertAt(dr1, 0);
            txtDetp_id1.Properties.DataSource    = dtDept;
            txtDetp_id1.Properties.ValueMember   = "dep_id";
            txtDetp_id1.Properties.DisplayMember = "dep_cdesc";
            txtDetp_id2.Properties.DataSource    = dtDept;
            txtDetp_id2.Properties.ValueMember   = "dep_id";
            txtDetp_id2.Properties.DisplayMember = "dep_cdesc";
        }
Exemplo n.º 3
0
 protected override void OnKeyDown(KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (NextControl != null)
         {
             NextControl.Focus();
         }
         base.OnKeyDown(e);
     }
 }
Exemplo n.º 4
0
        public frmTempReceiptQuery()
        {
            InitializeComponent();
            NextControl obj = new NextControl(this, "1");

            obj.EnterToTab();

            clsTranslate obj_ctl = new clsTranslate(this.Controls, DBUtility._language);

            obj_ctl.Translate();

            //權限
            objToolbar = new clsToolBar(this.Tag.ToString(), this.Controls);
            objToolbar.SetToolBar();
            objToolbar.Set_Button_Image(toolStrip1);
            //初始化查找條件
            objPub.Initialize_find_value(this.Name, this.Controls);
        }
Exemplo n.º 5
0
 void Atiran2DateControl_Enter(object sender, EventArgs e)
 {
     if (_dateCriterionFromServer)
     {
         if (NextControl != null && NextControl.Visible && NextControl.Enabled)
         {
             NextControl.Focus();
         }
         else if (NextControl != null && (!NextControl.Visible | !NextControl.Enabled))
         {
             SendKeys.Send("{TAB}");
         }
         this.Enabled = false;
     }
     else
     {
         Day.Focus();
     }
 }
Exemplo n.º 6
0
        public frmMmFind(string _type)
        {
            InitializeComponent();
            //窗體對象標簽翻譯
            clsTranslate obj_ctl = new clsTranslate(this.Controls, DBUtility._language);

            obj_ctl.Translate();

            //bs_mat_master中的字段modality用于區分物料的類型:
            //0 自制
            //1 委外
            //2 採購
            //3 成品(F0...)

            //參數_type = "0",允許選擇自制(0),委外(1)的貨品          --(即自制與委外,不包含採購件)
            //參數_type = "1",允許選擇自制(0),委外(1),採購(2)的貨品  --(即全部,包含採購件)
            m_goods_type = _type;
            if (_type == "1")
            {
                chkPur.Enabled = true;
                chkPur.Visible = true;
            }
            else
            {
                chkPur.Enabled = false;
                chkPur.Visible = false;
            }

            NextControl oNext = new NextControl(this, "1");

            oNext.EnterToTab();

            //加載按鈕圖片
            clsSetButtonImage objBtns = new clsSetButtonImage();

            objBtns.Set_Button_Image(toolStrip1);
        }
Exemplo n.º 7
0
        private void AddNext(StringBuilder pager)
        {
            var next = new NextControl(this);

            pager.Append(next.ToString());
        }
Exemplo n.º 8
0
 private void AddNext(StringBuilder pager)
 {
     var next = new NextControl(this);
     pager.Append(next.ToString());
 }