public SendIncidentRequestViewModel() { Approval.Add(new SelectListItem { Text = "NO", Value = "0" }); Approval.Add(new SelectListItem { Text = "YES", Value = "1" }); ApprovalTypeList.Add(new SelectListItem { Text = "Send back to department", Value = "0" }); ApprovalTypeList.Add(new SelectListItem { Text = "Send back to me", Value = "1" }); }
//ObservableCollection<string> lstApprovalids = new ObservableCollection<string>(); private void txtSelectApprovalType_SelectClick(object sender, EventArgs e) { SelectApprovalType txt = (SelectApprovalType)sender; string StrOld = txt.TxtSelectedApprovalType.Text.ToString(); string strXmlObjectSource = string.Empty; Dictionary <string, string> parameters = new Dictionary <string, string>(); //parameters.Add("CHARGEMONEY", fbCtr.Order.TOTALMONEY.ToString()); //parameters.Add("CHARGEMONEY", approvalInfo.CHARGEMONEY.ToString()); //parameters.Add("POSTLEVEL", postLevel); //parameters.Add("DEPARTMENTNAME", depName); //strXmlObjectSource = Utility.ObjListToXmlForTravel<T_OA_APPROVALINFO>(approvalInfo, "OA", parameters); ApprovalTypeList apptype = new ApprovalTypeList(StrOld, StrApprovaltype, lstApprovalids, OwnerCompanyid, OwnerDepartmentid, strXmlObjectSource); //ApprovalTypeList apptype = new ApprovalTypeList(StrOld, StrApprovaltype, lstApprovalids, OwnerCompanyid, OwnerDepartmentid, strXmlObjectSource); apptype.SelectedClicked += (obj, ea) => { StrApprovaltype = ""; string StrPost = apptype.Result.Keys.FirstOrDefault(); if (!string.IsNullOrEmpty(StrPost)) { txt.TxtSelectedApprovalType.Text = StrPost; //StrApprovalTypeName = StrPost;//用于传递给手机 } StrApprovaltype = apptype.Result[apptype.Result.Keys.FirstOrDefault()].ToString(); //根据选择回来的审批类型获取父值 //将父级的值清为空 StrApprovalOne = ""; StrApprovalTwo = ""; StrApprovalThird = ""; GetFatherApprovalType(StrApprovaltype, "first"); //_VM.Get_ApporvalTempletByApporvalTypeAsync(StrApprovaltype); RefreshUI(RefreshedTypes.ShowProgressBar); }; var windows = SMT.SAAS.Controls.Toolkit.Windows.ProgramManager.ShowProgram(Utility.GetResourceStr("SELECTAPPROVALTYPE"), "", "123", apptype, false, false, null); if (apptype is ApprovalTypeList) { (apptype as ApprovalTypeList).Close += (o, args) => { windows.Close(); }; } }