예제 #1
0
        /// <summary>
        /// 修改界面
        /// </summary>
        public override void SetModifyInit()
        {
            base.SetModifyInit();

            try
            {
                frmEditProduce_User frm = new frmEditProduce_User();
                frm.ScanMode = Common.DataModifyMode.upd;
                frm.dr = gridView1.GetFocusedDataRow();
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    GetDspDataList();
                }
            }
            catch (Exception ex)
            {

                XtraMsgBox.Show("画面初始化失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }
예제 #2
0
        /// <summary>
        /// 人员状态
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnStatus_Click(object sender, EventArgs e)
        {
            //this.TopMost = false;
            DataTable dt_temp = new DataTable();
            GetFormList(ref dt_temp);
            if (dt_temp.Rows.Count != 1)
            {
                FrmAttendDialog FrmDialog = new FrmAttendDialog("当前操作只能选择一人信息!");
                FrmDialog.ShowDialog();
                return;
            }
            else
            {
                try
                {
                    frmEditProduce_User frm = new frmEditProduce_User();
                    frm.ScanMode = Common.DataModifyMode.del;
                    DataTable dt_data = new DataTable();
                    dt_data.Columns.Add("Userid");
                    dt_data.Columns.Add("UserName");
                    dt_data.Columns.Add("Sex");
                    dt_data.Columns.Add("StatusIDs");
                    dt_data.Columns.Add("DutyName");
                    DataRow row = dt_data.NewRow();

                    row["Userid"] = dt_temp.Rows[0]["Userid"];
                    row["UserName"] = dt_temp.Rows[0]["UserNm"];
                    row["Sex"] = dt_temp.Rows[0]["Sex"];
                    row["StatusIDs"] = dt_temp.Rows[0]["StatusID"];
                    row["DutyName"] = "";

                    frm.dr = row;
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        //自动刷新
                        btnRef();
                    }
                }
                catch (Exception ex)
                {

                    XtraMsgBox.Show("画面初始化失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
                }
            }
        }