Esempio n. 1
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var detail = gvOut.GetFocusedRow() as CarOutRegistration;

            if (detail == null)
            {
                return;
            }
            FormEditOutRegistration form = new FormEditOutRegistration();

            form.curData   = detail;
            form.FormState = DS.MSClient.FormState.Modify;
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                btnSearch.PerformClick();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormSelectDispath form = new FormSelectDispath();

            form.state       = 1;
            form.ShowUpdate += form_ShowUpdate;
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                FormEditOutRegistration formout = new FormEditOutRegistration();
                formout.FormState = DS.MSClient.FormState.New;
                formout.curData   = new CarOutRegistration()
                {
                    DispatchID = selectModel.DispatchID,
                    CarID      = selectModel.CarID
                };
                if (formout.ShowDialog(this) == DialogResult.OK)
                {
                    btnSearch.PerformClick();
                }
            }
        }