Beispiel #1
0
 internal void ApplyItemTappedCommandFunction(ApplyDetail detail)
 {
     _navigationService.NavigationTo(NavigationServiceConstants.ActivityDetailPage, detail);
 }
Beispiel #2
0
        public ActionResult Print(string keyValue)
        {
            string[]     IDs       = keyValue.Split(',');
            int[]        IDArray   = Array.ConvertAll <string, int>(IDs, s => int.Parse(s));
            List <Apply> applyList = new List <Apply>();

            foreach (var ID in IDArray)
            {
                var applyBill = applyBillApp.GetForm(ID);
                applyBill.prtTag  = "T";
                applyBill.prtDate = DateTime.Now;
                applyBillApp.SubmitForm(applyBill, applyBill.ID);
                var price = priceApp.GetFormJson(applyBill.priNO);
                var apply = applyList.Where(t => t.purNo == applyBill.purNo).FirstOrDefault();
                if (apply != null)
                {
                    var         list = apply.applys;
                    ApplyDetail app  = new ApplyDetail();
                    app.prdName = price.prdName;
                    app.orderNo = price.orderNo;
                    app.spc     = price.spc;
                    app.price   = price.price;
                    app.Remark  = price.rem;
                    if (price.unit == applyBill.appUnit)
                    {
                        app.num      = applyBill.appNum;
                        app.viceNum  = (applyBill.viceNum ?? 0);
                        app.viceUnit = applyBill.viceUnit;
                    }
                    else
                    {
                        app.num      = (applyBill.viceNum ?? 0);
                        app.viceNum  = applyBill.appNum;
                        app.viceUnit = applyBill.appUnit;
                    }
                    app.unit  = price.unit;
                    app.total = Math.Round(app.price.Value * app.num.Value, 2);
                    if (price.currency.HasValue)
                    {
                        var ItemId = new ItemsApp().GetItemFormByName("币别").F_Id;
                        app.currency = new ItemsDetailApp().GetItemByItemIdAndCode(ItemId, price.currency.Value.ToString()).F_Description;
                    }
                    else
                    {
                        app.currency = "¥";
                    }
                    list.Add(app);
                    apply.TotalMoney = Math.Round(list.Sum(t => t.total).Value, 2);
                    apply.currency   = app.currency;
                }
                else
                {
                    Apply app = new Apply();
                    app.telPhone   = price.tel;
                    app.Fax        = price.fax;
                    app.date       = applyBill.date.ToDateString();
                    app.purAuthMan = applyBill.purAuthMan;
                    app.hopeDD     = applyBill.hopeDD.ToDateString();
                    app.purExaMan  = applyBill.purExaMan;
                    app.purMan     = applyBill.purMan;
                    app.purNo      = applyBill.purNo;
                    app.purSup     = applyBill.purSup;
                    app.remark     = price.rem;
                    var         list      = new List <ApplyDetail>();
                    ApplyDetail appDetail = new ApplyDetail();
                    appDetail.prdName = price.prdName;
                    appDetail.orderNo = price.orderNo;
                    appDetail.spc     = price.spc;
                    appDetail.price   = price.price;
                    if (price.unit == applyBill.appUnit)
                    {
                        appDetail.num      = applyBill.appNum;
                        appDetail.viceNum  = (applyBill.viceNum ?? 0);
                        appDetail.viceUnit = applyBill.viceUnit;
                    }
                    else
                    {
                        appDetail.num      = (applyBill.viceNum ?? 0);
                        appDetail.viceNum  = applyBill.appNum;
                        appDetail.viceUnit = applyBill.appUnit;
                    }
                    appDetail.unit  = price.unit;
                    appDetail.total = Math.Round(appDetail.price.Value * appDetail.num.Value, 2);
                    if (price.currency.HasValue)
                    {
                        var ItemId = new ItemsApp().GetItemFormByName("币别").F_Id;
                        appDetail.currency = new ItemsDetailApp().GetItemByItemIdAndCode(ItemId, price.currency.Value.ToString()).F_Description;
                    }
                    else
                    {
                        appDetail.currency = "¥";
                    }
                    list.Add(appDetail);
                    app.applys     = list;
                    app.TotalMoney = Math.Round(list.Sum(t => t.total).Value, 2);
                    app.currency   = appDetail.currency;
                    applyList.Add(app);
                }
            }

            return(View(applyList));
        }