Пример #1
0
 /// <summary>
 /// 新增规则事件
 /// xlb 2013-01-05
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonNewRule_Click(object sender, EventArgs e)
 {
     try
     {
         DS_Common.ClearControl(groupControlRule);
         DS_Common.ClearControl(groupControlCondtion);
         SetRuleEditState(true, true);
         editstate    = EditSate.Add;
         _currentRule = new QCRule();
         lookUpEditDoctorLevel.EditValue = null;
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Пример #2
0
        ///// <summary>
        ///// 双击事件
        ///// by xlb 2013-01-05
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //private void gridViewRule_DoubleClick(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        if (gridViewRule.FocusedRowHandle < 0)
        //        {
        //            return;
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        MyMessageBox.Show(1, ex);
        //    }
        //}
        #endregion

        /// <summary>
        /// 编辑事件
        /// by xlb 2013-01-05
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEditRule_Click(object sender, EventArgs e)
        {
            try
            {
                if (_currentRule == null || string.IsNullOrEmpty(_currentRule.RuleCode))
                {
                    MessageBox.Show("请选中一条数据");
                    return;
                }
                SetRuleEditState(true, true);
                editstate = EditSate.Edit;
                textBoxRuleName.Focus();
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }