Пример #1
0
 //浏览
 private void btnScan_Click(object sender, EventArgs e)
 {
     DataRow dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row;
     if (dr == null)
     {
         return;
     }
     UCOrganizeAddOrEdit ucOrgView = new UCOrganizeAddOrEdit();
     ucOrgView.uc = this;
     ucOrgView.windowStatus = WindowStatus.View;
     ucOrgView.drRecord = dr;            
     base.addUserControl(ucOrgView, "组织管理-浏览", dr["org_id"].ToString(), this.Tag.ToString(), this.Name);
 }
Пример #2
0
 /// <summary> 查看那
 /// </summary>
 void dgvRecord_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     DataRow dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row;
     if (dr == null)
     {
         return;
     }
     try
     {
         UCOrganizeAddOrEdit ucOrgView = new UCOrganizeAddOrEdit();
         ucOrgView.uc = this;
         ucOrgView.windowStatus = WindowStatus.View;
         ucOrgView.drRecord = dr;
         base.addUserControl(ucOrgView, "组织管理-查看", dr["org_id"].ToString(), this.Tag.ToString(), this.Name);
     }
     catch (Exception ex)
     {
         GlobalStaticObj_Server.GlobalLogService.WriteLog("组织管理", ex);
         MessageBoxEx.ShowWarning("程序异常");
     }
 }
Пример #3
0
 /// <summary>
 /// 添加或者编辑
 /// </summary>
 /// <param name="status"></param>
 /// <param name="menuName"></param>
 private void AddOrEdit(WindowStatus status, string menuName)
 {
     try
     {
         DataRow dr = null;
         string menuId = string.Empty;
         if (status == WindowStatus.Add)
         {
             menuId = "Organize_Add";
         }
         else
         {
             if (this.dgvRecord.CurrentRow == null)
             {
                 return;
             }
             dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row;
             menuId = dr["org_id"].ToString();
         }
         UCOrganizeAddOrEdit orgAddOrEdit = new UCOrganizeAddOrEdit();
         orgAddOrEdit.uc = this;
         orgAddOrEdit.drRecord = dr;
         orgAddOrEdit.windowStatus = status;
         base.addUserControl(orgAddOrEdit, menuName, menuId, this.Tag.ToString(), this.Name);
     }
     catch (Exception ex)
     {
         GlobalStaticObj_Server.GlobalLogService.WriteLog("组织管理", ex);
         MessageBoxEx.ShowWarning("程序异常");
     }
 }
Пример #4
0
 /// <summary>
 /// 添加或者编辑
 /// </summary>
 /// <param name="status"></param>
 /// <param name="menuName"></param>
 private void AddOrEdit(WindowStatus status, string menuName)
 {
     DataRow dr = null;
     string menuId = string.Empty;
     if (status == WindowStatus.Add)
     {
         menuId = "Organize_Add";
     }
     else
     {
         if (this.dgvRecord.CurrentRow == null)
         {
             return;
         }
         dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row;
         menuId = dr["org_id"].ToString();
     }
     UCOrganizeAddOrEdit orgAddOrEdit = new UCOrganizeAddOrEdit();
     orgAddOrEdit.uc = this;
     orgAddOrEdit.drRecord = dr;
     orgAddOrEdit.windowStatus = status;
     base.addUserControl(orgAddOrEdit, menuName, menuId, this.Tag.ToString(), this.Name);
 }