예제 #1
0
        void buttonArray_Click(object sender, EventArgs e)
        {
            //Use sender to identify which button in array was pressed
            var current = sender as Button;

            //Use name of button to get WBS number: TxtWBS_xxxxxxxx where xxxxxxxx starts on position 7
            TxtWBS.Text = current.Name.Substring(7);

            //Find corresponding WBS description
            foreach (Control c in this.Controls)
            {
                if (c.Name == "TxtWBSDescription_" + current.Name.Substring(7))
                {
                    TxtWBSDescription.Text = c.Text;
                }
            }

            TxtComment.Focus();
        }
예제 #2
0
 protected void Txtcreditamt_TextChanged(object sender, EventArgs e)
 {
     TxtComment.Focus();
 }