コード例 #1
0
ファイル: FrmPowerState.cs プロジェクト: github188/myitoppsp
 private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (this.gridView2.FocusedRowHandle >= 0)
     {
         FrmAddPowerState frm = new FrmAddPowerState();
         frm.Area      = this;
         frm.Text      = "添加记录";
         frm.IsCreate  = true;
         frm.ProjectID = ProjectID;
         string f = this.gridView2.GetRowCellValue(this.gridView2.FocusedRowHandle, "Title").ToString();
         if (f == "现状")
         {
             f = "1";
         }
         else if (f == "规划")
         {
             f = "2";
         }
         frm.Flag = f;
         PSP_PowerSubstationInfo obj = new PSP_PowerSubstationInfo();
         obj.UID    = Guid.NewGuid().ToString();
         frm.Object = obj;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             frm.Close();
             InitGrid1();
         }
     }
     else
     {
         MessageBox.Show("请先选择规划或现状", "添加", MessageBoxButtons.OK);
     }
 }
コード例 #2
0
ファイル: FrmPowerState.cs プロジェクト: github188/myitoppsp
 private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (this.gridView1.FocusedRowHandle >= 0)
     {
         FrmAddPowerState frm = new FrmAddPowerState();
         frm.Text      = "修改记录";
         frm.ProjectID = ProjectID;
         string f = this.gridView2.GetRowCellValue(this.gridView2.FocusedRowHandle, "Title").ToString();
         if (f == "现状")
         {
             f = "1";
         }
         else if (f == "规划")
         {
             f = "2";
         }
         frm.Flag = f;
         PSP_PowerSubstationInfo obj = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as PSP_PowerSubstationInfo;
         frm.Object = obj;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             frm.Close();
             InitGrid1();
         }
     }
     else
     {
         MessageBox.Show("请先选择一条记录", "修改", MessageBoxButtons.OK);
     }
 }
コード例 #3
0
ファイル: FrmPowerState.cs プロジェクト: EdgarEDT/myitoppsp
 private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (this.gridView2.FocusedRowHandle >= 0)
     {
         FrmAddPowerState frm = new FrmAddPowerState();
         frm.Area = this;
         frm.Text = "添加记录";
         frm.IsCreate = true;
         frm.ProjectID = ProjectID;
         string f = this.gridView2.GetRowCellValue(this.gridView2.FocusedRowHandle, "Title").ToString();
         if (f == "现状")
             f = "1";
         else if (f == "规划")
             f = "2";
         frm.Flag = f;
         PSP_PowerSubstationInfo obj = new PSP_PowerSubstationInfo();
         obj.UID = Guid.NewGuid().ToString();
         frm.Object = obj;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             frm.Close();
             InitGrid1();
         }
     }
     else
     {
         MessageBox.Show("请先选择规划或现状", "添加", MessageBoxButtons.OK);
     }
 }
コード例 #4
0
ファイル: FrmPowerState.cs プロジェクト: EdgarEDT/myitoppsp
 private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (this.gridView1.FocusedRowHandle >= 0)
     {
         FrmAddPowerState frm = new FrmAddPowerState();
         frm.Text = "修改记录";
         frm.ProjectID = ProjectID;
         string f = this.gridView2.GetRowCellValue(this.gridView2.FocusedRowHandle, "Title").ToString();
         if (f == "现状")
             f = "1";
         else if (f == "规划")
             f = "2";
         frm.Flag = f;
         PSP_PowerSubstationInfo obj = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as PSP_PowerSubstationInfo;
         frm.Object = obj;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             frm.Close();
             InitGrid1();
         }
     }
     else
     {
         MessageBox.Show("请先选择一条记录", "修改", MessageBoxButtons.OK);
     }
 }