/// <summary> /// 签退按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (gridView1.SelectedRowsCount < 1) { MsgBox.Warn("请你选择要签退的人员!"); return; } FrmTempAuthorize fta = new FrmTempAuthorize("管理员"); if (fta.ShowDialog() != DialogResult.OK) { return; } DataRowView user1 = gridView1.GetRow(gridView1.FocusedRowHandle) as DataRowView; UserEntity user2 = GetUserInfo(user1["USER_CODE"].ToString()); bool result = LoginRegister(user2.UserCode, registerType, user2.UserPwd); if (!result) { //MsgBox.Warn("该人员有未处理完的任务,不允许签退!"); return; } Insert(ELogType.签退, GlobeSettings.LoginedUser.UserName, user2.UserCode, "pc签退"); OnFormLoad(null, null); }
private void CloseTask() { try { TaskEntity entity = SelectedTaskRow; if (entity == null) { MsgBox.Warn("请选择一条任务。"); return; } if (entity.TaskType != "143") { MsgBox.Warn("现阶段只支持关闭下架任务。后续功能开发中。。。"); return; } //List<SODetailEntity> list = this.CalcNonFullDetails(entity.TaskID); //DialogResult result = DialogResult.OK; //if (list.Count > 0) //{ // using (FrmNonFullDetails frmNonFullDetails = new FrmNonFullDetails(list)) // { // result = frmNonFullDetails.ShowDialog(); // } //} //if (result != DialogResult.OK) // return; FrmTempAuthorize frmAuthorize = new FrmTempAuthorize("管理员"); if (frmAuthorize.ShowDialog() == DialogResult.OK) { if (this.taskDal.CloseTask(entity) > 0) { ReLoad(); } LogDal.Insert(ELogType.操作任务, frmAuthorize.AuthUserCode, ConvertUtil.ToString(entity.TaskID), "关闭任务", "任务池管理"); } } catch (Exception ex) { MsgBox.Err(ex.Message); } }