Beispiel #1
0
        protected async override Task modifyItem(HsLabelValue item)
        {
            Panel_Sdrdxm panel = new Panel_Sdrdxm(item);

            if (item.GetValueByLabel("Xmzt") == "0" && item.GetValueByLabel("Zdr") == GetLoginData().Username)
            {
                panel.UpdateComplete += new EventHandler <HsEventArgs <object> >(async(sender, e) =>
                {
                    try
                    {
                        await this.callRetrieve(false);
                    }
                    catch (Exception ex)
                    {
                        this.ShowError(ex.Message);
                    }
                });
            }
            else
            {
                panel.AuditOnly = true;
            }

            await Navigation.PushAsync(panel);
        }
Beispiel #2
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId             = data.GetValueByLabel("KhId");
     this._ucKhmc.ControlValue = data.GetValueByLabel("Khmc");
     this._ucDz.ControlValue   = data.GetValueByLabel("Dz");
     this._ucYzbm.ControlValue = data.GetValueByLabel("Yzbm");
     this._ucBz.ControlValue   = data.GetValueByLabel("Bz");
 }
Beispiel #3
0
            protected override HsLabelValue createLabelAndValue(HsLabelValue item)
            {
                string bjdw = item.GetValueByLabel("Bjdw");

                string je = item.GetValueByLabel("Je");

                item.Label = bjdw;
                item.Value = je;

                return(item);
            }
Beispiel #4
0
            protected override HsLabelValue createLabelAndValue(HsLabelValue item)
            {
                string mc = item.GetValueByLabel("Mc");

                string sl = item.GetValueByLabel("Sl");

                item.Label = mc;
                item.Value = sl;

                return(item);
            }
Beispiel #5
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId               = data.GetValueByLabel("DjId");
     this._ucDjrq.ControlValue   = data.GetValueByLabel("Djrq");
     this._uXmmc.ControlValue    = data.GetValueByLabel("Xmmc");
     this._ucJtsp.ControlValue   = data.GetValueByLabel("Jtsp");
     this._ucFjxm.ControlValue   = data.GetValueByLabel("Fjxm");
     this._ucDxsm.ControlValue   = data.GetValueByLabel("Dxsm");
     this._ucBjyj.ControlValue   = data.GetValueByLabel("Bjyj");
     this._ucBjje.ControlValue   = data.GetValueByLabel("Bjje");
     this._ucBz.ControlValue     = data.GetValueByLabel("Bz");
     this._ucDetail.ControlValue = data.GetValueByLabel("StrMx");
 }
Beispiel #6
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId             = data.GetValueByLabel("XmId");
     this._ucXmmc.ControlValue = data.GetValueByLabel("Xmmc");
     this._ucXmly.ControlValue = data.GetValueByLabel("Xmly");
     this._ucKh.ControlValue   = data.GetValueByLabel("KhId") + "," + data.GetValueByLabel("Khmc");
     this._ucKh.AllowEdit      = false;
     this._ucRq.ControlValue   = data.GetValueByLabel("Rq");
     this._ucLxr.ControlValue  = data.GetValueByLabel("Lxr");
     this._ucZy.ControlValue   = data.GetValueByLabel("Zy");
     this._ucXmjd.ControlValue = data.GetValueByLabel("Xmjd");
     this._ucBz.ControlValue   = data.GetValueByLabel("Bz");
 }
Beispiel #7
0
        /// <summary>
        /// 检查是否更新
        /// </summary>
        protected async void _checkIsUpgrade()
        {
            try
            {
                //获取新版本
                HsLabelValue item = await getLastestIPAInfo();

                //取版本号
                HsVersion version = HsVersion.Parse(item.GetValueByLabel("Version"));

                string upgradeUri = item.GetValueByLabel("UpgradeURI");

                //检查版本最后一位,如果是奇数表明是一般更新,偶数表明是强制更新
                IPlatformExtension pe = DependencyService.Get <IPlatformExtension>();

                HsVersion currentVersion = HsVersion.Parse(pe.GetApplicationVersion());

                if (pe != null && version > currentVersion) //存在新版本
                {
                    if (version.Type == HsVersion.EType.Force)
                    {
                        await this.DisplayAlert($"发现新版本 {version},请立即更新", $"当前版本 {currentVersion}", "确定");

                        pe.OpenURL(upgradeUri);
                    }
                    else
                    {
                        if (await this.DisplayAlert($"发现新版本 {version},是否更新", $"当前版本 {currentVersion}", "是", "否"))
                        {
                            pe.OpenURL(upgradeUri);
                        }
                        else
                        {
                            this.onUpgradeComplete();
                        }
                    }
                }
                else
                {
                    this.onUpgradeComplete();
                }
            }
            catch (Exception e)
            {
                this.ShowError(e.Message);

                this.onUpgradeComplete();
            }
        }
        protected override IList <MenuItem> onCreateContextMenuItems(HsLabelValue item)
        {
            IList <MenuItem> items = base.onCreateContextMenuItems(item);

            items.Add(new MenuItem()
            {
                Text             = "原始单据",
                Command          = this,
                CommandParameter = new HsCommandParams(SysActionKeys.UserDo1, item)
            });

            items.Add(new MenuItem()
            {
                Text             = "查看步骤",
                Command          = this,
                CommandParameter = new HsCommandParams(SysActionKeys.UserDo2, item)
            });

            if (item.GetValueByLabel("Jlzt") == "0")
            {
                items.Add(new MenuItem()
                {
                    Text             = "审批",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.UserDo3, item),
                    IsDestructive    = true
                });
            }


            return(items);
        }
Beispiel #9
0
        protected override IList <MenuItem> onCreateContextMenuItems(HsLabelValue item)
        {
            IList <MenuItem> items = base.onCreateContextMenuItems(item);

            if (item.GetValueByLabel("Jlzt") == "0")
            {
                items.Add(new MenuItem()
                {
                    Text             = "提交",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.UserDo1.SetLabel("提交"), item)
                });

                items.Add(new MenuItem()
                {
                    Text             = "删除",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.除, item), IsDestructive = true
                });
            }
            else
            {
                items.Add(new MenuItem()
                {
                    Text             = "取消提交",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.UserDo2.SetLabel("取消提交"), item)
                });
            }

            return(items);
        }
Beispiel #10
0
        protected override IList <MenuItem> onCreateContextMenuItems(HsLabelValue item)
        {
            IList <MenuItem> items = base.onCreateContextMenuItems(item);

            string htzt = item.GetValueByLabel("Htzt");

            if (htzt == "0")
            {
                items.Add(new MenuItem()
                {
                    Text             = "删除",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.除, item),
                    IsDestructive    = true
                });
            }
            else
            {
                items.Add(new MenuItem()
                {
                    Text             = "回款记录",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.UserDo3, item)
                });
            }

            return(items);
        }
Beispiel #11
0
        protected override IList <MenuItem> onCreateContextMenuItems(HsLabelValue item)
        {
            IList <MenuItem> items = base.onCreateContextMenuItems(item);

            if (item.GetValueByLabel("Xmzt") == "0")
            {
                items.Add(new MenuItem()
                {
                    Text             = "跟进",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.UserDo1.SetLabel("跟进"), item),
                });
            }
            else
            {
                items.Add(new MenuItem()
                {
                    Text             = "取消跟进",
                    Command          = this,
                    CommandParameter = new HsCommandParams(SysActionKeys.UserDo2.SetLabel("取消跟进"), item),
                });
            }

            return(items);
        }
Beispiel #12
0
        protected override void setData(HsLabelValue data)
        {
            this.uniqueId = data.GetValueByLabel("JlId");

            this._ucXm.ControlValue = $"{data.GetValueByLabel("XmId")},{data.GetValueByLabel("Xmmc")}";

            this._ucLxr.ControlValue = $"{data.GetValueByLabel("LxrId")},{data.GetValueByLabel("Khmc")}-{data.GetValueByLabel("LxrName")}";

            this._ucJlrq.ControlValue = data.GetValueByLabel("Jlrq");

            this._ucJllx.ControlValue = data.GetValueByLabel("Jllx");

            this._ucJlpj.ControlValue = data.GetValueByLabel("Jlpj");

            this._ucJlzy.ControlValue = data.GetValueByLabel("Jlzy");

            this._ucBz.ControlValue = data.GetValueByLabel("Bz");
        }
Beispiel #13
0
 protected override void setData(HsLabelValue data)
 {
     this._ucMc.ControlValue   = data.GetValueByLabel("Mc");
     this._ucXh.ControlValue   = data.GetValueByLabel("Xh");
     this._ucKcsl.ControlValue = data.GetValueByLabel("Kcsl");
     this._ucSl.ControlValue   = data.GetValueByLabel("Sl");
     this._ucDj.ControlValue   = data.GetValueByLabel("Dj");
     this._ucJe.ControlValue   = data.GetValueByLabel("Je");
     this._ucYq.ControlValue   = data.GetValueByLabel("Yq");
     this._ucBz.ControlValue   = data.GetValueByLabel("Bz");
 }
Beispiel #14
0
 protected override void setData(HsLabelValue data)
 {
     this._ucWlmc.ControlValue = data.GetValueByLabel("Wlmc");
     this._ucBjdw.ControlValue = data.GetValueByLabel("Bjdw");
     this._ucGgxh.ControlValue = data.GetValueByLabel("Ggxh");
     this._ucSl.ControlValue   = data.GetValueByLabel("Sl");
     this._ucDj.ControlValue   = data.GetValueByLabel("Dj");
     this._ucJe.ControlValue   = data.GetValueByLabel("Je");
     this._ucLxfs.ControlValue = data.GetValueByLabel("Lxfs");
     this._ucBz.ControlValue   = data.GetValueByLabel("Bz");
 }
Beispiel #15
0
        public Panel_HsLcspjl(HsLabelValue lcspjl) : base(lcspjl)
        {
            //通过模版Id判断流程类型
            this._lcStyle = lcspjl.GetValueByLabel("MbId") != "0" ? ELcStyle.固定流程 : ELcStyle.自由流程;

            this.PP = new PageParams()
            {
                ImageTitle = "审批图片", detailTitle = "审批附件"
            };
        }
Beispiel #16
0
        protected override void onCreateMainItems()
        {
            this._ucHt              = new UcAutoCompleteInput(SdrdDjlx.RDHT);
            this._ucHt.CName        = "合同信息";
            this._ucHt.AllowEmpty   = true;
            this._ucHt.DataChanged += new EventHandler <HsEventArgs <string> >(async(sender, e) =>
            {
                try
                {
                    if (this.iNewRecode == 0)
                    {
                        //获取合同未回款金额。
                        string htId = this._ucHt.ControlValue;

                        if (!string.IsNullOrWhiteSpace(htId))
                        {
                            string result = await((SdrdWSUtil)GetWSUtil()).GetHt(GetLoginData().ProgressId, htId);

                            HsLabelValue ht = XElement.Parse(result).ToHsLabelValue();

                            this._ucHkje.ControlValue = ht.GetValueByLabel("Syje");
                        }
                    }
                }
                catch (Exception ex)
                {
                    this.ShowError(ex.Message);
                }
            });
            this.controls.Add(this._ucHt);

            this._ucJlrq = new UcDateInput()
            {
                Flag = UcDateInput.NOW
            };
            this._ucJlrq.CName      = "合同日期";
            this._ucJlrq.AllowEmpty = false;
            this.controls.Add(this._ucJlrq);

            this._ucHksm       = new UcTextInput();
            this._ucHksm.CName = "回款说明";
            this.controls.Add(this._ucHksm);

            this._ucHkje = new UcNumInput()
            {
                CanFushu = false
            };
            this._ucHkje.CName      = "合同金额";
            this._ucHkje.AllowEmpty = false;
            this.controls.Add(this._ucHkje);

            this._ucBz       = new UcTextInput();
            this._ucBz.CName = "备注";
            this.controls.Add(this._ucBz);
        }
Beispiel #17
0
        protected async Task <string> callRemoteDoData(HsLabelValue item, string actionFlag)
        {
            if (string.IsNullOrWhiteSpace(uniqueIdField))
            {
                throw new HsException("未定义uniqueIdField");
            }

            XElement xbhs = new XElement("Data", new XElement("Bh", item.GetValueByLabel(uniqueIdField)));

            return(await GetWSUtil().DoDatas(GetLoginData().ProgressId, xbhs.ToString(SaveOptions.DisableFormatting), actionFlag));
        }
Beispiel #18
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId             = data.GetValueByLabel("JlId");
     this._ucHt.ControlValue   = data.GetValueByLabel("HtId") + "," + data.GetValueByLabel("Htmc");
     this._ucHt.AllowEdit      = false;
     this._ucJlrq.ControlValue = data.GetValueByLabel("Jlrq");
     this._ucHksm.ControlValue = data.GetValueByLabel("Hksm");
     this._ucHkje.ControlValue = data.GetValueByLabel("Hkje");
     this._ucBz.ControlValue   = data.GetValueByLabel("Bz");
 }
Beispiel #19
0
        protected override async Task callAction(HsActionKey actionKey, HsLabelValue item)
        {
            if (actionKey == HsOAActionKeys.查看流程审批记录) //查看审批记录
            {
                Form_HsLcspjl_Show form = new Form_HsLcspjl_Show(item.GetValueByLabel("Djlx"), item.GetValueByLabel("DjId"));

                await Navigation.PushAsync(form);
            }
            else
            {
                await base.callAction(actionKey, item);
            }
        }
Beispiel #20
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId               = data.GetValueByLabel("DjId");
     this._ucDjrq.ControlValue   = data.GetValueByLabel("Djrq");
     this._ucDjrq.AllowEdit      = false;
     this._uCgbt.ControlValue    = data.GetValueByLabel("Cgbt");
     this._ucSfjj.ControlValue   = data.GetValueByLabel("Sfjj");
     this._ucCgyy.ControlValue   = data.GetValueByLabel("Cgyy");
     this._ucBz.ControlValue     = data.GetValueByLabel("Bz");
     this._ucDetail.ControlValue = data.GetValueByLabel("StrMx");
 }
Beispiel #21
0
        protected override IList <MenuItem> onCreateContextMenuItems(HsLabelValue item)
        {
            IList <MenuItem> items = base.onCreateContextMenuItems(item);

            if (item.GetValueByLabel("Spzt") == "0" && !this.AuditOnly)
            {
                if (this.allowStartFreeLc)
                {
                    items.Add(new MenuItem()
                    {
                        Text             = "自由流程",
                        Command          = this,
                        CommandParameter = new HsCommandParams(HsOAActionKeys.发起自由流程.SetLabel("开始发起"), item),
                    });
                }

                if (this.allowStartRegularLc)
                {
                    items.Add(new MenuItem()
                    {
                        Text             = "规则流程",
                        Command          = this,
                        CommandParameter = new HsCommandParams(HsOAActionKeys.发起规则流程.SetLabel("开始发起"), item),
                    });
                }
            }
            else
            {
                items.Add(new MenuItem()
                {
                    Text             = "审批记录",
                    Command          = this,
                    CommandParameter = new HsCommandParams(HsOAActionKeys.查看流程审批记录, item)
                });

                if (!this.AuditOnly)
                {
                    items.Add(new MenuItem()
                    {
                        Text             = "终止流程",
                        Command          = this,
                        CommandParameter = new HsCommandParams(HsOAActionKeys.终止流程.SetLabel("终止"), item),
                        IsDestructive    = true
                    });
                }
            }

            return(items);
        }
Beispiel #22
0
        protected override void setData(HsLabelValue data)
        {
            this.uniqueId               = data.GetValueByLabel("JlId");
            this._djlx                  = data.GetValueByLabel("Djlx");
            this._ucLczy.ControlValue   = data.GetValueByLabel("Lczy");
            this._ucLczy.AllowEdit      = false;
            this._ucBzmc.ControlValue   = data.GetValueByLabel("Bzmc");
            this._ucBzmc.AllowEdit      = false;
            this._ucDwmc.ControlValue   = data.GetValueByLabel("Dwmc");
            this._ucDwmc.AllowEdit      = false;
            this._ucRolemc.ControlValue = data.GetValueByLabel("Rolemc");
            this._ucRolemc.AllowEdit    = false;
            this._ucZdr.ControlValue    = data.GetValueByLabel("Zdr");
            this._ucZdr.AllowEdit       = false;
            this._ucSpyj.ControlValue   = data.GetValueByLabel("Spyj");

            if (data.GetValueByLabel("Bzlx") == ELcbzlx.通知确认类)
            {
                this._ucSpyj.Reset();
                this._ucSpyj.AllowEmpty   = false;
                this._ucJlzt.ControlValue = "1"; //通知确认类步骤直接置为同意
                this._ucJlzt.IsVisible    = false;
            }
            else
            {
                this._ucSpyj.AllowEmpty   = true;
                this._ucJlzt.ControlValue = data.GetValueByLabel("Jlzt");
            }


            //只有一退的审批方式才显示退会审批
            if (new string[] { ELcbzspfs.一进全退, ELcbzspfs.一进半退, ELcbzspfs.半进半退 }.FirstOrDefault(r => r == data.GetValueByLabel("Spfs")) != null)
            {
                this._ucZdthsp.IsVisible = false;
            }
        }
Beispiel #23
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId             = data.GetValueByLabel("HtId");
     this._ucKh.ControlValue   = data.GetValueByLabel("KhId") + "," + data.GetValueByLabel("Khmc");
     this._ucXm.ControlValue   = data.GetValueByLabel("XmId") + "," + data.GetValueByLabel("Xmmc");
     this._ucHtbh.ControlValue = data.GetValueByLabel("Htbh");
     this._ucHtmc.ControlValue = data.GetValueByLabel("Htmc");
     this._ucHtrq.ControlValue = data.GetValueByLabel("Htrq");
     this._ucHtje.ControlValue = data.GetValueByLabel("Htje");
     this._ucFkfs.ControlValue = data.GetValueByLabel("Fkfs");
     this._ucHtqx.ControlValue = data.GetValueByLabel("Htqx");
     this._ucZytk.ControlValue = data.GetValueByLabel("Zytk");
     this._ucBz.ControlValue   = data.GetValueByLabel("Bz");
 }
Beispiel #24
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId             = data.GetValueByLabel("DjId");
     this._ucDjrq.ControlValue = data.GetValueByLabel("Djrq");
     this._ucXmmc.ControlValue = data.GetValueByLabel("Xmmc");
     this._ucWjbh.ControlValue = data.GetValueByLabel("Wjbh");
     this._ucJtsp.ControlValue = data.GetValueByLabel("Jtsp");
     this._ucYsje.ControlValue = data.GetValueByLabel("Ysje");
     this._ucFjxm.ControlValue = data.GetValueByLabel("Fjxm");
     this._ucSfjg.ControlValue = data.GetValueByLabel("Sfjg");
     this._ucJgsm.ControlValue = data.GetValueByLabel("Jgsm");
     this._ucQtsm.ControlValue = data.GetValueByLabel("Qtsm");
     this._ucBz.ControlValue   = data.GetValueByLabel("Bz");
 }
Beispiel #25
0
        private async Task downloadAndOpen(HsFile item)
        {
            //如果文件存在与本地,则直接打开,否则先下载再打开。

            string[] cachePath = new string[] { "Cache", "Files" };

            string cachefilename = $"{item.FileHash}.{item.FileName}";

            IPlatformExtension pe = DependencyService.Get <IPlatformExtension>(DependencyFetchTarget.GlobalInstance);

            if (!pe.FileExist(cachefilename, cachePath)) //文件不存在需要下载
            {
                int index = 0;

                using (MemoryStream ms = new MemoryStream())
                {
                    while (true)
                    {
                        //下载文件...
                        HsLabelValue result = await GetWSUtil().GetSysFileSeg(GetLoginData().ProgressId, item.FileHash, index);

                        if (result == null) //文件读取完毕
                        {
                            break;
                        }

                        byte[] buffer = HsBase64.FromBase64ToBytes(result.GetValueByLabel("Data"));

                        //数据解压缩
                        buffer = HsZlib.DecompressData(buffer);

                        ms.Write(buffer, 0, buffer.Length);

                        index++;
                    }

                    byte[] fileData = ms.ToArray();

                    Debug.WriteLine(HsMD5.EncryptionMD5(fileData));

                    await pe.WriteFile(cachefilename, fileData, 2, cachePath);
                }

                await downloadAndOpen(item);
            }
            else
            {
                List <string> previewFiletypes = new List <string>()
                {
                    "DOC", "DOCX",
                    "XLS", "XLSX",
                    "PPT", "PPTX",
                    "PDF",
                    "TXT", "TEXT",
                    "JPG", "PNG"
                };

                if (previewFiletypes.Contains(item.FileType.ToUpper()))
                {
                    string url = pe.GetFileURL(cachefilename, cachePath);

                    if (!string.IsNullOrWhiteSpace(url))
                    {
                        Panel_PreviewFile panel = new Panel_PreviewFile();

                        panel.Source = new UrlWebViewSource()
                        {
                            Url = url
                        };

                        await Navigation.PushAsync(panel);
                    }
                }
                else
                {
                    pe.CallFile(cachefilename, cachePath);
                }
            }
        }
Beispiel #26
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId                = data.GetValueByLabel("JlId");
     this._ucHt.ControlValue      = data.GetValueByLabel("HtId") + "," + data.GetValueByLabel("Htmc");
     this._ucHt.AllowEdit         = false;
     this._ucJlrq.ControlValue    = data.GetValueByLabel("Jlrq");
     this._ucKhmyd.ControlValue   = data.GetValueByLabel("Khmyd");
     this._ucSjzlyll.ControlValue = data.GetValueByLabel("Sjzlyll");
     this._ucXmjd.ControlValue    = data.GetValueByLabel("Xmjd");
     this._ucXmrcgl.ControlValue  = data.GetValueByLabel("Xmrcgl");
     this._ucBmjdxz.ControlValue  = data.GetValueByLabel("Bmjdxz");
     this._ucKzxzb.ControlValue   = data.GetValueByLabel("Kzxzb");
     this._ucBz.ControlValue      = data.GetValueByLabel("Bz");
 }
Beispiel #27
0
 public Form_HsLcspjl_Show(HsLabelValue item) : this(item.GetValueByLabel("Djlx"), item.GetValueByLabel("DjId"))
 {
 }
Beispiel #28
0
        protected override async void callAction(HsActionKey actionKey, object item)
        {
            try
            {
                if (actionKey == SysActionKeys.关闭)
                {
                    await PopupNavigation.PopAsync();
                }
                else if (actionKey == SysActionKeys.修改密码)
                {
                    callAction(SysActionKeys.关闭, null);

                    this.onPopupData(actionKey, null);
                }
                else if (actionKey == SysActionKeys.UserDo1)
                {
                    //清除缓存
                    long size = await HsDependencyService <IPlatformExtension> .Instance().DirectoryDelete("Cache");

                    await this.DisplayAlert("缓存删除成功。", size != 0?$"释放空间{size.GetFileSizeString()}" : "无缓存文件", "确定");

                    callAction(SysActionKeys.关闭, null);
                }
                else if (actionKey == SysActionKeys.UserDo2)
                {
                    //获取新版本
                    HsLabelValue lvVersion = await getLastestIPAInfo();

                    //取版本号
                    HsVersion version = HsVersion.Parse(lvVersion.GetValueByLabel("Version"));

                    string upgradeUri = lvVersion.GetValueByLabel("UpgradeURI");

                    //检查版本最后一位,如果是奇数表明是一般更新,偶数表明是强制更新
                    IPlatformExtension pe = DependencyService.Get <IPlatformExtension>();

                    HsVersion currentVersion = HsVersion.Parse(pe.GetApplicationVersion());

                    if (pe != null && version > currentVersion)                     //存在新版本
                    {
                        if (version.Type == HsVersion.EType.Force)
                        {
                            await this.DisplayAlert($"发现新版本 {version},请立即更新", $"当前版本 {currentVersion}", "确定");

                            pe.OpenURL(upgradeUri);
                        }
                        else
                        {
                            if (await this.DisplayAlert($"发现新版本 {version},是否更新", $"当前版本 {currentVersion}", "是", "否"))
                            {
                                pe.OpenURL(upgradeUri);
                            }
                        }
                    }
                    else
                    {
                        await this.DisplayAlert("当前是最新版本", $"当前版本 {currentVersion}", "确定");
                    }

                    callAction(SysActionKeys.关闭, null);
                }
                else if (actionKey == SysActionKeys.注销)
                {
                    //注销
                    if (await this.DisplayAlert("是否要注销?", "", "是", "否"))
                    {
                        this.onPopupData(actionKey, null);

                        callAction(SysActionKeys.关闭, null);
                    }
                }
            }
            catch (Exception ex)
            {
                this.ShowError(ex.Message);
            }
        }
Beispiel #29
0
        protected override async Task <string> doDataItem(HsActionKey actionKey, HsLabelValue item)
        {
            if (actionKey == HsOAActionKeys.发起自由流程) //发起自由流程
            {
                throw new HsException("未实现发起自由流程逻辑");
            }
            else if (actionKey == HsOAActionKeys.发起规则流程) //发起规则流程
            {
                #region 发起规则流程

                LoginData loginData = GetLoginData();

                string fqr = item.GetValueByLabel("Fqr");

                if (fqr != loginData.Username)
                {
                    throw new HsException($"流程只能由【{fqr}】发起。");
                }

                List <HsLabelValue> lcmbs = await((HsOAWSUtil)GetWSUtil()).GetHsLcmbs(loginData.ProgressId, this.djlx);

                if (lcmbs.Count < 1)
                {
                    throw new HsException("未找到符合条件的流程模版");
                }

                UcAutoCompleteInput.AutoCompleteDataPopupPage page = new UcAutoCompleteInput.AutoCompleteDataPopupPage("流程模版", lcmbs)
                {
                    UserDo1Text = "确定"
                };

                page.PopupData += new EventHandler <HsEventArgs <HsActionKey, string> >(async(sender, e) =>
                {
                    try
                    {
                        //通过获取的模版Id发起流程
                        if (!string.IsNullOrWhiteSpace(e.Data2))
                        {
                            string result = await((HsOAWSUtil)GetWSUtil()).StartRegularHsLc(GetLoginData().ProgressId, e.Data2, item.GetValueByLabel("DjId"));

                            this.ShowInformation(result);

                            await callRetrieve(false);
                        }
                    }
                    catch (Exception ex)
                    {
                        this.ShowError(ex.Message);
                    }
                });

                await PopupNavigation.PushAsync(page);

                return(await Task.FromResult(""));

                #endregion
            }
            else if (actionKey == HsOAActionKeys.终止流程) //终止流程
            {
                #region 终止流程

                LoginData loginData = GetLoginData();

                string fqr = item.GetValueByLabel("Fqr");

                if (fqr != loginData.Username)
                {
                    throw new HsException($"流程只能由【{fqr}】终止。");
                }

                string result = await((HsOAWSUtil)GetWSUtil()).OverHsLc(loginData.ProgressId, this.djlx, item.GetValueByLabel("DjId"));

                this.ShowInformation(result);

                await this.callRetrieve(false);

                return(await Task.FromResult(""));

                #endregion
            }
            else
            {
                return(await base.doDataItem(actionKey, item));
            }
        }
Beispiel #30
0
 protected override void setData(HsLabelValue data)
 {
     this.uniqueId = data.GetValueByLabel("DjId");
     this._ucJgqrd.ControlValue = $"{data.GetValueByLabel("QrdId")},{data.GetValueByLabel("QrdXmmc")}";
     this._ucDjrq.ControlValue  = data.GetValueByLabel("Djrq");
     this._ucHtdw.ControlValue  = data.GetValueByLabel("Htdw");
     this._ucHtmc.ControlValue  = data.GetValueByLabel("Htmc");
     this._ucHtbh.ControlValue  = data.GetValueByLabel("Htbh");
     this._ucJgly.ControlValue  = data.GetValueByLabel("Jgly");
     this._ucJtsp.ControlValue  = data.GetValueByLabel("Jtsp");
     this._ucFjxm.ControlValue  = data.GetValueByLabel("Fjxm");
     this._ucHtje.ControlValue  = data.GetValueByLabel("Htje");
     this._ucFkfs.ControlValue  = data.GetValueByLabel("Fkfs");
     this._ucHtqx.ControlValue  = data.GetValueByLabel("Htqx");
     this._ucZytk.ControlValue  = data.GetValueByLabel("Zytk");
     this._ucBz.ControlValue    = data.GetValueByLabel("Bz");
 }