Beispiel #1
0
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     try
     {
         frmBengZhanEdit frmBengZhanEditObj = new frmBengZhanEdit();
         string          strDepName         = "";
         if (this.trvDep.SelectedNode != null)
         {
             if (this.trvDep.SelectedNode.Parent != null)
             {
                 strDepName = this.trvDep.SelectedNode.Text.Trim();
             }
         }
         if (strDepName == "")
         {
             MessageBox.Show("请选中监测站所属单位!");
             return;
         }
         frmBengZhanEditObj.m_strDepName = strDepName;
         frmBengZhanEditObj.ShowDialog();
         if (frmBengZhanEditObj.m_bInserted == true)
         {
             this.paintFrm();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Beispiel #2
0
 private void btnEdit_Click(object sender, System.EventArgs e)
 {
     try
     {
         if (this.lsvWell.SelectedItems.Count == 0)
         {
             MessageBox.Show("请选择需要修改的监测站信息!");
             return;
         }
         frmBengZhanEdit frmBengZhanEditObj = new frmBengZhanEdit();
         frmBengZhanEditObj.m_bEdit     = true;
         frmBengZhanEditObj.m_strWellNo = this.lsvWell.SelectedItems[0].Text.Trim();
         frmBengZhanEditObj.ShowDialog();
         if (frmBengZhanEditObj.m_bInserted == true)
         {
             this.paintFrm();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Beispiel #3
0
        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            try
            {

                frmBengZhanEdit frmBengZhanEditObj=new frmBengZhanEdit();
                string strDepName="";
                if(this.trvDep.SelectedNode!=null)
                {
                    if(this.trvDep.SelectedNode.Parent!=null)
                    {
                        strDepName=this.trvDep.SelectedNode.Text.Trim();
                    }
                }
                if(strDepName=="")
                {
                    MessageBox.Show("��ѡ�м��վ�����λ��");
                    return;
                }
                frmBengZhanEditObj.m_strDepName=strDepName;
                frmBengZhanEditObj.ShowDialog();
                if(frmBengZhanEditObj.m_bInserted==true)
                {
                    this.paintFrm();
                }

            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Beispiel #4
0
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            try
            {
                if(this.lsvWell.SelectedItems.Count==0)
                {
                    MessageBox.Show("��ѡ����Ҫ�޸ĵļ��վ��Ϣ��");
                    return;
                }
                frmBengZhanEdit frmBengZhanEditObj=new frmBengZhanEdit();
                frmBengZhanEditObj.m_bEdit=true;
                frmBengZhanEditObj.m_strWellNo=this.lsvWell.SelectedItems[0].Text.Trim();
                frmBengZhanEditObj.ShowDialog();
                if(frmBengZhanEditObj.m_bInserted==true)
                {
                    this.paintFrm();
                }

            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }