コード例 #1
0
        /// <summary>
        /// 修改柜台信息
        /// </summary>
        /// <param name="handle">当前行</param>
        private void CounterUpdate(int handle)
        {
            try
            {
                if (handle < 0)
                {
                    return;
                }
                CounterEdit counterEdit = new CounterEdit();
                counterEdit.EditType = 2;
                DataRow dw       = ViewCounter.GetDataRow(handle);
                int     CouterID = int.Parse(dw["CouterID"].ToString());

                CT_Counter Counter = CounterBLL.GetModel(CouterID);
                counterEdit.Counter = Counter;
                if (counterEdit.ShowDialog(this) == DialogResult.OK)
                {
                    InitCounterList();
                    this.ViewCounter.FocusedRowHandle = handle;
                }
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("修改柜台信息失败!");
                string      errCode   = "GL-3005";
                string      errMsg    = "修改柜台信息失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
            }
        }
コード例 #2
0
        private void Btn_Add_Click(object sender, EventArgs e)
        {
            CounterEdit counterEdit = new CounterEdit();

            counterEdit.EditType = 1;
            if (counterEdit.ShowDialog(this) == DialogResult.OK)
            {
                InitCounterList();
            }
        }