private void btReEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (MainHelper.UserOrg == null) return; if (gridView1.FocusedRowHandle >= 0) { DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle) ; PJ_03yxfx yxfx=new PJ_03yxfx (); foreach (DataColumn dc in gridtable.Columns) { if (dc.ColumnName != "Image") yxfx.GetType().GetProperty(dc.ColumnName).SetValue(yxfx, dr[dc.ColumnName], null); } //if (!RecordWorkTask.HaveRunRecordRole(yxfx.ID ,MainHelper.User.UserID )) return; //DataTable dt = RecordWorkTask.GetRecordWorkFlowData(yxfx.ID, MainHelper.User.UserID); frmyxfxEdit fm = new frmyxfxEdit(); //switch (dt.Rows[0]["TaskInsCaption"].ToString()) //{ // case "领导检查": // fm.RecordStatus = 1; // break; // case "检查人检查": // fm.RecordStatus = 2; // break; //} //fm.RecordWorkFlowData = dt; fm.RowData = yxfx; if(fm.ShowDialog()== DialogResult.OK) RefreshData("where orgcode='" + btGdsList.EditValue + "'and type like '%" + recordIkind + "%' order by id desc"); } else { return; } }
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmyxfxEdit fm = new frmyxfxEdit(); PJ_03yxfx yxfx = new PJ_03yxfx(); DataRow dr = gridView1.GetFocusedDataRow(); if (dr == null) return; foreach (DataColumn dc in gridtable.Columns) { if (dc.ColumnName != "Image") yxfx.GetType().GetProperty(dc.ColumnName).SetValue(yxfx, dr[dc.ColumnName], null); } fm.RowData = yxfx; fm.RecordStatus = -1; fm.ShowDialog(); //if (MainHelper.UserOrg == null) return; //if (gridView1.FocusedRowHandle >= 0) //{ // DataRow dr = gridView1.GetFocusedDataRow(); // PJ_03yxfx yxfx = new PJ_03yxfx(); // foreach (DataColumn dc in gridtable.Columns) // { // if (dc.ColumnName != "Image") yxfx.GetType().GetProperty(dc.ColumnName).SetValue(yxfx, dr[dc.ColumnName], null); // } // //if (!RecordWorkTask.HaveRunRecordRole(yxfx.ID, MainHelper.User.UserID)) return; // DataTable dt = RecordWorkTask.GetRecordWorkFlowData(yxfx.ID, MainHelper.User.UserID); // frmyxfxEdit fm = new frmyxfxEdit(); // IList<mUser> lm = ClientHelper.PlatformSqlMap.GetList<mUser>(" where usercode in (select UserID from ruserrole where roleID in (select RoleID from mRole where RoleName in ('生产局长','生技部长') ))"); // string usercode = MainHelper.User.UserCode; // for (int i = 0; i < lm.Count; i++) // { // if (lm[i].UserCode == usercode) // { // if (btReEdit.Caption == "领导检查") // { // fm.RecordStatus = 1; // break; // } // else if (btReEdit.Caption == "检查人检查") // { // fm.RecordStatus = 2; // break; // } // } // else if (i == lm.Count - 1 && lm[i].UserCode != usercode) // { // MsgBox.ShowWarningMessageBox("抱歉,您没有检查权限!"); // return; // } // } // fm.RecordWorkFlowData = dt; // fm.RowData = yxfx; // fm.ShowDialog(); // RefreshData("where orgcode='" + btGdsList.EditValue + "'and type='" + recordIkind + "' order by id desc"); //} //else //{ // return; //} }
private void btView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (gridView1.FocusedRowHandle >= 0) { PJ_03yxfx yxfx = new PJ_03yxfx(); DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle); foreach (DataColumn dc in gridtable.Columns) { if (dc.ColumnName != "Image") yxfx.GetType().GetProperty(dc.ColumnName).SetValue(yxfx, dr[dc.ColumnName], null); } Export03.ExportExcel(yxfx); } else { return; } }
private void btReEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmyxfxEdit fm = new frmyxfxEdit(); PJ_03yxfx yxfx = new PJ_03yxfx(); DataRow dr = gridView1.GetFocusedDataRow(); if (dr == null) return; foreach (DataColumn dc in gridtable.Columns) { if (dc.ColumnName != "Image") yxfx.GetType().GetProperty(dc.ColumnName).SetValue(yxfx, dr[dc.ColumnName], null); } fm.RowData = yxfx; if (isJu()) { fm.RecordStatus = 4; } else { fm.RecordStatus = 3; } if (fm.ShowDialog() == DialogResult.OK) { RefreshData("where orgcode='" + yxfx.OrgCode + "'and type='" + yxfx.type + "' order by id desc"); } }