Beispiel #1
0
        private void btn_new_Click(object sender, EventArgs e)
        {
            if (f_intIdext == 1)
            {
                FrmClinicarItemManage frm = new FrmClinicarItemManage();
                frm.Text         = "新增";
                frm.DialogStatus = DialogStatus.New;

                if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    this.ucDgv_list.Search(1);
                }
                frm.Dispose();
            }
            else if (f_intIdext == 2)
            {
                ClinicarItem entity = this.GetCurrentRowData();
                if (entity == null)
                {
                    return;
                }
                FrmClinicarItemDetailManage frm = new FrmClinicarItemDetailManage();
                frm.Text           = "新增";
                frm.DialogStatus   = DialogStatus.New;
                frm.DataEntityItem = entity;

                if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    detailGridSearch(entity);
                }
                frm.Dispose();
            }
        }
Beispiel #2
0
        private void btn_mod_Click(object sender, EventArgs e)
        {
            if (f_intIdext == 1)
            {
                ClinicarItem entity = this.GetCurrentRowData();
                if (entity != null)
                {
                    FrmClinicarItemManage frm = new FrmClinicarItemManage();
                    frm.Text         = "修改";
                    frm.DialogStatus = DialogStatus.Modify;
                    frm.DataEntity   = entity;

                    if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        this.ucDgv_list.Search(1);
                    }
                    frm.Dispose();
                }
            }
            else if (f_intIdext == 2)
            {
                ClinicarItem       entity       = this.GetCurrentRowData();
                ClinicarItemDetail entityDetail = this.GetDetailCurrentRowData();

                if (entity != null && entityDetail != null)
                {
                    FrmClinicarItemDetailManage frm = new FrmClinicarItemDetailManage();
                    frm.Text             = "修改";
                    frm.DialogStatus     = DialogStatus.Modify;
                    frm.DataEntityItem   = entity;
                    frm.DataEntityDetail = entityDetail;

                    if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        detailGridSearch(entity);
                    }
                    frm.Dispose();
                }
            }
        }