void PapersListTable_MouseDoubleClick(object sender, MouseButtonEventArgs e) { try { _mPaperParamTemp = null; var itema = PaperInfoListTable.SelectedItem as CPaperParam; if (itema != null) { S3603App.GQueryModify = false; S3603App.GPaperParam = new CPaperParam(); S3603App.GPaperParam = itema; _mPaperParamTemp = itema; S3603App.GPaperInfoParamo.PaperParam = _mPaperParamTemp; TestPaperPage newPage = new TestPaperPage { ExamProductionParentPage = ParentPage, CurrentApp = CurrentApp }; ParentPage.PopupPaperInfo.Content = newPage; ParentPage.PopupPaperInfo.Title = CurrentApp.GetLanguageInfo("3603T00055", "Paper Information"); ParentPage.PopupPaperInfo.IsOpen = true; } } catch (Exception ex) { ShowException(ex.Message); } }
public PaperAddQuestionPage() { _mCPaperParam = S3602App.GPaperInfo.PaperParam; _mLstQuestionsParam = S3602App.GLstQuestionInfos; _mlstPaperQuestionParam = new List <CPaperQuestionParam>(); _mlstChangePaperQuestionParam = new List <CPaperQuestionParam>(); InitializeComponent(); this.Loaded += UCCustomSetting_Loaded; }
private bool GetPaperInfo(string strSql, out CPaperParam paperParam) { paperParam = new CPaperParam(); try { WebRequest webRequest = new WebRequest(); webRequest.Session = UMPApp.Session; webRequest.Code = (int)S3603Codes.OptSearchPapers; OperationReturn optReturn = XMLHelper.SeriallizeObject(strSql); if (!optReturn.Result) { UMPApp.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return(false); } webRequest.ListData.Add(optReturn.Data.ToString()); Service36031Client client = new Service36031Client(WebHelper.CreateBasicHttpBinding(App.Session), WebHelper.CreateEndpointAddress(App.Session.AppServerInfo, "Service36031")); //var client = new Service36031Client(); WebReturn webReturn = client.UmpTaskOperation(webRequest); client.Close(); if (!webReturn.Result) { UMPApp.ShowExceptionMessage(string.Format("{0}: {1}", UMPApp.GetLanguageInfo("3603T00065", "Search Failed"), webReturn.Message)); return(false); } if (webReturn.ListData.Count <= 0) { return(true); } for (int i = 0; i < webReturn.ListData.Count; i++) { optReturn = XMLHelper.DeserializeObject <CPaperParam>(webReturn.ListData[i]); if (!optReturn.Result) { UMPApp.ShowExceptionMessage(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); continue; } var paperInfo = optReturn.Data as CPaperParam; if (paperInfo == null) { UMPApp.ShowExceptionMessage("Fail. filesItem is null"); return(false); } paperParam = paperInfo; } } catch (Exception ex) { UMPApp.ShowExceptionMessage(ex.Message); } return(true); }
private void GetPaperInfos() { try { _mListPapersInfoCollection.Clear(); var webRequest = new WebRequest(); Service36011Client client = new Service36011Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service36011")); //var client = new Service36011Client(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S3601Codes.OperationSearchPapers; OperationReturn optReturn = XMLHelper.SeriallizeObject(_mlPaperParamsTemp); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); return; } webRequest.ListData.Add(optReturn.Data.ToString()); WebReturn webReturn = client.UmpTaskOperation(webRequest); client.Close(); if (!webReturn.Result) { ShowException(CurrentApp.GetLanguageInfo("3601T00015", "Insert data failed")); return; } if (webReturn.ListData.Count <= 0) { return; } for (int i = 0; i < webReturn.ListData.Count; i++) { optReturn = new OperationReturn(); optReturn = XMLHelper.DeserializeObject <CPaperParam>(webReturn.ListData[i]); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); continue; } CPaperParam cExamPapers = optReturn.Data as CPaperParam; if (cExamPapers == null) { ShowException(string.Format("Fail. filesItem is null")); return; } _mListPapersInfoCollection.Add(cExamPapers); _mlPaperParamsOld.Add(cExamPapers); } } catch (Exception ex) { ShowException(ex.Message); } }
public TestPaperPage() { _mlPaperQuestionParams = new List <CPaperQuestionParam>(); _mlToFPaperQuestionParams = new List <CPaperQuestionParam>(); _mlScPaperQuestionParams = new List <CPaperQuestionParam>(); _mlMcPaperQuestionParams = new List <CPaperQuestionParam>(); _mPaperParam = S3603App.GPaperParam; _miPaperScore = 0; InitializeComponent(); this.Loaded += UCCustomSetting_Loaded; }
public PaperInfo() { _mWorker = new BackgroundWorker(); _mObservableCollectionPaperParams = new ObservableCollection <CPaperParam>(); _mListPaperInfos = new List <CPaperParam>(); _mPaperParamTemp = null; InitializeComponent(); Loaded += PapersListInfo_Loaded; Loaded += UCCustomSetting_Loaded; }
public PaperRemovQuestionPage() { InitializeComponent(); _mListPapersInfoCollection = new ObservableCollection <CPaperParam>(); PIDocument.ItemsSource = _mListPapersInfoCollection; _mlPaperParamsTemp = new List <CPaperParam>(); _mlPaperParamsOld = new List <CPaperParam>(); _mPaperParam = new CPaperParam(); _mlPaperQuestionParams = new List <CPaperQuestionParam>(); _mlQuestionsParams = S3601App.GListQuestionInfos; _mlPaperQuestionParam = new List <CPaperQuestionParam>(); Init(); }
private void PiDocument_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (Keyboard.IsKeyDown(Key.RightCtrl) || Keyboard.IsKeyDown(Key.RightShift) || Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.LeftShift)) { return; } _mPaperParam = new CPaperParam(); var item = PIDocument.SelectedItem as CPaperParam; _mPaperParam = item; }
private bool SetPaperInfo() { _mCAddPaper = new CPaperParam { StrName = TbPaperName.Text.Trim(), StrDescribe = TbDescribeConnect.Text.Trim() }; if (CbPaperType.SelectedIndex < 0) { return(false); } switch (CbPaperType.SelectedIndex) { case 0: _mCAddPaper.CharType = '1'; break; case 1: _mCAddPaper.CharType = '2'; break; case 2: _mCAddPaper.CharType = '3'; break; case 3: _mCAddPaper.CharType = '4'; break; case 4: _mCAddPaper.CharType = '5'; break; } _mCAddPaper.IntScores = Convert.ToInt32(TbScores.Text); _mCAddPaper.IntPassMark = Convert.ToInt32(TbPassMark.Text); _mCAddPaper.IntTestTime = Convert.ToInt32(TbTestTime.Text); _mCAddPaper.LongEditorId = Convert.ToInt64(CurrentApp.Session.UserInfo.UserID); _mCAddPaper.StrEditor = CurrentApp.Session.UserInfo.UserName; _mCAddPaper.StrDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); if (_mAddPaperInfo.OptType == S3602Codes.OptUpdatePaper) { _mCAddPaper.IntQuestionNum = _mAddPaperInfo.PaperParam.IntQuestionNum; _mCAddPaper.IntUsed = _mAddPaperInfo.PaperParam.IntUsed; _mCAddPaper.IntAudit = _mAddPaperInfo.PaperParam.IntAudit; _mCAddPaper.LongVerifierId = _mAddPaperInfo.PaperParam.LongVerifierId; _mCAddPaper.StrVerifier = _mAddPaperInfo.PaperParam.StrVerifier; _mCAddPaper.IntIntegrity = _mIntScoreOld != Convert.ToInt32(TbScores.Text) ? 0 : _mAddPaperInfo.PaperParam.IntIntegrity; } return(true); }
private void SetPaperParams() { try { _mlPaperParamsTemp.Clear(); foreach (var mlLong in _mlLongs) { CPaperParam param = new CPaperParam(); param.LongNum = mlLong; _mlPaperParamsTemp.Add(param); } } catch (Exception ex) { ShowException(ex.Message); } }
private void PiDocument_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (Keyboard.IsKeyDown(Key.RightCtrl) || Keyboard.IsKeyDown(Key.RightShift) || Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.LeftShift)) { return; } _mPaperParam = new CPaperParam(); var item = PIDocument.SelectedItem as CPaperParam; _mPaperParam = item; GetPaperQustions(); UsableScore(); ScoreValue.Text = string.Format("{0}({1} - {2})", CurrentApp.GetLanguageInfo("3601T00057", "Score"), _mIntScore, _mPaperParam.IntScores); }
void PapersListTable_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { try { _mPaperParamTemp = null; S3603App.GPaperInfoParamo = new PaperInfoParam(); var item = PaperInfoListTable.SelectedItem as CPaperParam; if (item != null) { _mPaperParamTemp = item; S3603App.GPaperInfoParamo.PaperParam = _mPaperParamTemp; S3603App.GPaperInfoParamo.OptType = S3603Codes.OptAddInfo; } } catch (Exception ex) { ShowException(ex.Message); } }
private void PanelObjectPaper_IsSelectedChanged(object sender, EventArgs e) { if (!_mbPaperTable) { var item = TestInfoListTable.SelectedItem as TestInfoParam; if (item != null) { App.GQueryModify = false; App.GTestInformation = new TestInfoParam(); App.GTestInformation = item; App.GPaperParam = new CPaperParam(); CPaperParam paperParam = new CPaperParam(); if (GetPaperInfo(SqlSearchPaper(item), out paperParam)) { App.GPaperParam = paperParam; TestPaperPage testPaperPage = new TestPaperPage(); TestPaperPageName.Children.Add(testPaperPage); } } _mbPaperTable = true; _mbExamineeInfoTable = false; } }