private void queryFormal_StartQuery(object sender, NCS.UI.Controls.QueryEventArgs e) { ServiceReference2.Service1Client client = new ServiceReference2.Service1Client(); client.GetstudentCompleted += (se, de) => { var list = de.Result.ConvertEntityAndCollection <System.Collections.ObjectModel.ObservableCollection <Student>, Student, ServiceReference2.Student>(); //循环添加选择时的判断 foreach (var sp in list) { sp.onChange += (spd, spe) => { ServiceReference2.Service1Client client2 = new ServiceReference2.Service1Client(); //需要查找对应的Pending表,然后返回审核状态值及逆行比较 client2.ReStateCompleted += (gh, dde) => { if (dde.Result == (int)NCS.Business.DataFlow.EnumAuditState.Submit || dde.Result == (int)NCS.Business.DataFlow.EnumAuditState.Reject) { MessageBox.Show("该数据有未审核或拒审的,不许进行其他操作,不能选择!"); sp.IsCheck = false; } }; client2.ReStateAsync(sp.StudentId); }; } queryFormal.FinishedQuery(list, de.recount); }; client.GetstudentAsync(e.Conditions); }
private void queryExamine_StartQuery(object sender, NCS.UI.Controls.QueryEventArgs e) { e.Conditions.Conditions.Add(new NCS.DataAccess.QueryCondition() { Checked = true, Operator = NCS.DataAccess.QueryConditionOperator.Equal, Property = "AUDIT_STATE", Value = 2 }); //e.Conditions.Conditions.AddRange(new NCS.DataAccess.QueryCondition[] { // new NCS.DataAccess.QueryCondition() { // Checked=true, // Property="AUDIT_STATE", // Operator=NCS.DataAccess.QueryConditionOperator.NotEqual, // Value=3 //},new NCS.DataAccess.QueryCondition() { // Checked=true, // Property="AUDIT_STATE", // Operator=NCS.DataAccess.QueryConditionOperator.NotEqual, // Value =4 //} //}); ServiceReference2.Service1Client client = new ServiceReference2.Service1Client(); client.GetStudentPendingsCompleted += (se, de) => { var list = de.Result.ConvertEntityAndCollection <System.Collections.ObjectModel.ObservableCollection <StudentPending>, StudentPending, ServiceReference2.StudentPending>(); queryExamine.FinishedQuery(list, de.recount); }; client.GetStudentPendingsAsync(e.Conditions); }
private void queryForm1_StartQuery(object sender, NCS.UI.Controls.QueryEventArgs e) { var s = e.Conditions; ServiceReference2.Service1Client client = new ServiceReference2.Service1Client(); //client.GetStudentsCompleted += (sd, de) => // { // var list = de.Result.ConvertEntityAndCollection<System.Collections.ObjectModel.ObservableCollection<Student>, Student, ServiceReference2.Student>(); // queryForm1.FinishedQuery(list, de.recount); // }; //client.GetStudentsAsync(s); }
private void queryReject_StartQuery(object sender, NCS.UI.Controls.QueryEventArgs e) { e.Conditions.Conditions.Add(new NCS.DataAccess.QueryCondition() { Checked = true, Property = "AUDIT_STATE", Operator = NCS.DataAccess.QueryConditionOperator.Equal, Value = 4 }); ServiceReference2.Service1Client client = new ServiceReference2.Service1Client(); client.GetRejectStudentCompleted += (se, de) => { var list = de.Result.ConvertEntityAndCollection <System.Collections.ObjectModel.ObservableCollection <StudentPending>, StudentPending, ServiceReference2.StudentPending>(); queryReject.FinishedQuery(list, de.recount); }; client.GetRejectStudentAsync(e.Conditions); }