Beispiel #1
0
        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_APPROVALINFOTEMPLET>(approvalInfo, "OA", parameters);
            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");
            };
            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();
                };
            }
        }
Beispiel #2
0
        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();
                };
            }
        }