Exemple #1
0
        private void ShowBemForm(string ids, string entryIds, string lotIds, string PformId)
        {
            DynamicFormShowParameter dynamicFormShowParameter = new DynamicFormShowParameter();

            dynamicFormShowParameter.MultiSelect  = false;
            dynamicFormShowParameter.ParentPageId = this.View.PageId;
            dynamicFormShowParameter.FormId       = "BEM_QANO";

            List <string> lotEntity = new List <string>();



            if (!string.IsNullOrWhiteSpace(lotIds.Trim()))
            {
                dynamicFormShowParameter.CustomParams.Add("lotIds", lotIds);
                dynamicFormShowParameter.CustomParams.Add("ids", ids);
                dynamicFormShowParameter.CustomParams.Add("pformid", PformId);
                dynamicFormShowParameter.CustomParams.Add("entryIds", entryIds);
            }

            this.View.ShowForm(dynamicFormShowParameter, delegate(FormResult result)
            {
                if (result.ReturnData != null)
                {
                    this.View.Refresh();
                }
            });
        }
Exemple #2
0
        public override void AfterButtonClick(AfterButtonClickEventArgs e)
        {
            base.AfterButtonClick(e);
            DynamicObject o = (DynamicObject)this.Model.DataObject;

            long id = Convert.ToInt64(o["Id"]);

            if (e.Key.ToUpperInvariant().Equals("F_LHR_CHECK"))
            {
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.FormId = "LHR_CHECKDATANOTES";
                this.View.ShowForm(showParam, new Action <FormResult>((FormResult) =>
                {
                    if (FormResult != null && FormResult.ReturnData != null)
                    {
                        //获取物料所在盘点表所在index

                        long materialId = ((CheckNotesReturnInfo)FormResult.ReturnData).Materialid;
                        string strSql   = string.Format(@"/*dialect*/select b.FSEQ from T_STK_STKCOUNTINPUT a inner join T_STK_STKCOUNTINPUTENTRY b on a.FID = b.FID where a.FID = {0} and b.FMATERIALID ={1}", id, materialId);
                        int result      = DBUtils.ExecuteScalar <int>(this.Context, strSql, -1, null);
                        if (result != -1)
                        {
                            this.Model.SetValue("FCountQty", ((CheckNotesReturnInfo)FormResult.ReturnData).Qty, result - 1);
                        }
                    }
                }));
            }
        }
        public override void AfterButtonClick(AfterButtonClickEventArgs e)
        {
            base.AfterButtonClick(e);
            string key = e.Key.ToUpperInvariant();

            switch (key)
            {
            case "FQUERY":
                string FSDate = this.View.Model.GetValue("FSDate") == null ? "" : this.View.Model.GetValue("FSDate").ToString();
                string FEDate = this.View.Model.GetValue("FEDate") == null ? "" : this.View.Model.GetValue("FEDate").ToString();
                string FOrgId = this.View.Model.GetValue("FOrgId") == null ? "0" :
                                (this.View.Model.GetValue("FOrgId") as DynamicObject)["Id"].ToString();
                string FDeptID = this.View.Model.GetValue("FDeptID") == null ? "0" :
                                 (this.View.Model.GetValue("FDeptID") as DynamicObject)["Id"].ToString();
                string FAccountId = this.View.Model.GetValue("FAccountId") == null ? "0" :
                                    (this.View.Model.GetValue("FAccountId") as DynamicObject)["Id"].ToString();


                DynamicFormShowParameter param = new DynamicFormShowParameter();
                param.ParentPageId       = this.View.PageId;
                param.FormId             = "ora_CZ_CostAmount";
                param.OpenStyle.ShowType = ShowType.MainNewTabPage;

                param.CustomParams.Add("FSDate", FSDate);
                param.CustomParams.Add("FEDate", FEDate);
                param.CustomParams.Add("FOrgId", FOrgId);
                param.CustomParams.Add("FDeptID", FDeptID);
                param.CustomParams.Add("FAccountId", FAccountId);

                this.View.ShowForm(param);
                break;
            }
        }
Exemple #4
0
        /// <summary>
        /// 集体请假
        /// </summary>
        private void Act_ABIC_AllLeave()
        {
            var para = new DynamicFormShowParameter();

            para.FormId             = "ora_OA_AllLeaveSetting";
            para.OpenStyle.ShowType = ShowType.MainNewTabPage;
            para.ParentPageId       = this.View.PageId;

            this.View.ShowForm(para);
        }
Exemple #5
0
        public override void ButtonClick(ButtonClickEventArgs e)
        {
            base.ButtonClick(e);

            if (e.Key.EqualsIgnoreCase("F_PAE_Button"))
            {
                DynamicFormShowParameter showFormPara = new DynamicFormShowParameter();
                showFormPara.FormId = "k2a30f11491e2485b949c98792f73b0e0";
                showFormPara.CustomParams.Add("aaa", "111");
                //showFormPara.CustomParams.Add("resizable", "111");
                this.View.ShowForm(showFormPara);
            }
            else if (e.Key.EqualsIgnoreCase("F_PAE_Button2"))
            {
                //this.View.ParentFormView.GetControl("F_PAE_Text").SetEnabled("", false);
                this.View.ParentFormView.GetControl("F_PAE_Text").SetValue("aaa");
                this.View.GetControl("F_PAE_Lable").Text = "aaaa";
                //this.View.ParentFormView.GetMainBarItem("tbNewList").Enabled = false;
                //this.View.ParentFormView.GetBarItem("ToolBar", "tbNewList").Enabled = false;


                //this.View.ParentFormView.StyleManager.

                this.View.SendDynamicFormAction(this.View.ParentFormView);
                this.View.UpdateView();
            }
            else if (e.Key.EqualsIgnoreCase("F_PAE_btnSave"))
            {
                /*
                 * IViewService viewService = this.Model.GetService<IViewService>();
                 * FormMetadata test3Meta = FormMetaDataCache.GetCachedFormMetaData(this.Context, "kd015e925f51e411b8408c1f8e7fcb066");
                 * DynamicObjectType dyType = test3Meta.BusinessInfo.GetDynamicObjectType();
                 * DynamicObject dyObj = new DynamicObject(dyType);
                 *
                 * dyObj["BillNo"] = DateTime.Now.ToString("yyyyMMddHHmmssss");
                 * dyObj["F_PAE_Text1"] = "11111";
                 *
                 * BusinessDataServiceHelper.Save(this.Context,dyObj);
                 *
                 * var result = this.Model.LoadReferenceData(dyType,100005);
                 * //var result=BusinessDataServiceHelper.LoadSingle(this.Context, 100005, dyType);
                 * if (result != null) {
                 *  this.View.ShowMessage(result["Id"].ToString());
                 * }
                 */

                //this.View.InvokeFormOperation(FormOperationEnum.Save);

                this.View.GetMainBarItem("tbSNew").Enabled = true;

                //SaveBillInfo();
            }
        }
Exemple #6
0
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            base.EntityRowDoubleClick(e);
            string FDeptName = this.View.Model.GetValue("FField_1", e.Row) == null ? "" :
                               this.View.Model.GetValue("FField_1", e.Row).ToString();

            if (FDeptName == "")
            {
                return;
            }
            string FCostItemId       = "";
            int    currClickColIndex = 0;

            try
            {
                currClickColIndex = int.Parse(e.ColKey.Split('_')[1]);
            }
            catch { }

            if (currClickColIndex >= 3)
            {
                int colIndex = currClickColIndex - 3;
                FCostItemId = costItems.Rows[colIndex]["FEXPID"].ToString();
                //this.View.ShowMessage(e.ColKey + " " + colIndex.ToString());
            }


            string FSDate = this.View.OpenParameter.GetCustomParameter("FSDate") == null ? "" :
                            this.View.OpenParameter.GetCustomParameter("FSDate").ToString();
            string FEDate = this.View.OpenParameter.GetCustomParameter("FEDate") == null ? "" :
                            this.View.OpenParameter.GetCustomParameter("FEDate").ToString();
            string FOrgId = this.View.OpenParameter.GetCustomParameter("FOrgId") == null ? "0" :
                            this.View.OpenParameter.GetCustomParameter("FOrgId").ToString();
            string FAccountId = this.View.OpenParameter.GetCustomParameter("FAccountId") == null ? "0" :
                                this.View.OpenParameter.GetCustomParameter("FAccountId").ToString();

            DynamicFormShowParameter param = new DynamicFormShowParameter();

            param.ParentPageId       = this.View.PageId;
            param.FormId             = "ora_VounterDetail";
            param.OpenStyle.ShowType = ShowType.Modal;

            param.CustomParams.Add("FSDate", FSDate);
            param.CustomParams.Add("FEDate", FEDate);
            param.CustomParams.Add("FOrgId", FOrgId);
            param.CustomParams.Add("FAccountId", FAccountId);
            param.CustomParams.Add("FDeptName", FDeptName);
            param.CustomParams.Add("FCostItemId", FCostItemId);

            this.View.ShowForm(param);
        }
Exemple #7
0
        /// <summary>
        /// 通过简单扩展字段名,取出json,动态生成界面
        /// 字段名为FExtension_0001,则0001为“简单扩展”
        // H标记代表表头,E标记代表分录,因为BeforeF7Select的事件里面没办法知道是表头还是分录点击的,
        //e.Row为0既可以是表头字段也可以是分录的第一行,太混淆,只能用标记

        /// </summary>
        /// <param name="fieldKey"></param>
        public void ShowBillExtension(string fieldKey, String pageId, int row)
        {
            if (fieldKey.StartsWith(Constant.FExtension))
            {
                string jsonValue     = null;
                bool   isFieldInHead = IsFieldInHead(fieldKey);
                if (isFieldInHead)
                {
                    jsonValue = view.GetHeadValue(fieldKey) as string;
                }
                else
                {
                    jsonValue = view.GetEntryValue(fieldKey, row) as string;
                }



                string simpleExtensionNumber = fieldKey.Substring(fieldKey.LastIndexOf("_") + 1, fieldKey.Length - 1 - fieldKey.LastIndexOf("_"));
                var    simpleExtension       = repository.GetSimpleExtensionByNumber(simpleExtensionNumber);

                DynamicFormShowParameter showParam = new DynamicFormShowParameter
                {
                    FormId       = FormID.WJ_ExtensionUI,
                    ParentPageId = pageId
                };
                showParam.CustomComplexParams.Add("simpleExtension", simpleExtension);

                showParam.CustomParams.Add("jsonValue", jsonValue);
                showParam.OpenStyle.ShowType = ShowType.Modal;

                //返回编辑好的json
                this.view.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        string returnjson = (string)formResult.ReturnData;

                        if (isFieldInHead)
                        {
                            view.SetHeadValue(fieldKey, returnjson);
                        }
                        else
                        {
                            view.SetEntryValue(fieldKey, returnjson, row);
                        }
                    }
                }
                                                           ));
            }
        }
 /*
  * 案例演示: 动态表单标识 -- k2fbf554726e74faa9a27106077618f02
  *
  * 创建一个动态表单,在该动态表单上添加一个按钮,点击该按钮后显示另外一个动态表单
  */
 public override void ButtonClick(ButtonClickEventArgs e)
 {
     base.ButtonClick(e);
     if (e.Key.EqualsIgnoreCase("F_PAEZ_Button"))
     {
         var formShowParam = new DynamicFormShowParameter();
         formShowParam.FormId = "PAEZ_BeShownForm";
         //formShowParam.OpenStyle.ShowType = ShowType.MainNewTabPage;
         formShowParam.ParentPageId = this.View.PageId;
         //自定义值
         //formShowParam.CustomParams.Add("自定义Key", "值");
         this.View.ShowForm(formShowParam);
     }
 }
Exemple #9
0
        public override void AfterBarItemClick(AfterBarItemClickEventArgs e)
        {
            base.AfterBarItemClick(e);
            string key = e.BarItemKey.ToUpperInvariant();

            switch (key)
            {
            case "ORA_TBGETYUNZHIJIADATA":     //ora_tbGetYunZhiJiaData
                var param = new DynamicFormShowParameter();
                param.FormId             = "ora_HR_SignInSync";
                param.OpenStyle.ShowType = ShowType.Modal;     //打开方式
                param.ParentPageId       = this.View.PageId;
                this.View.ShowForm(param);
                break;
            }
        }
Exemple #10
0
        public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e)
        {
            base.AfterEntryBarItemClick(e);
            if (e.BarItemKey.EqualsIgnoreCase("tbViewVounter"))
            {
                string key = this.Model.GetEntryCurrentFieldKey("FEntity");
                int    currClickColIndex = 0;
                try
                {
                    currClickColIndex = int.Parse(key.Split('_')[1]);
                }
                catch { }

                if (currClickColIndex < 3)
                {
                    this.View.ShowWarnningMessage("请先选中费用项目列!");
                    return;
                }
                int colIndex = currClickColIndex - 3;
                //this.View.ShowMessage(key + " " + colIndex.ToString());

                string FCostItemId = costItems.Rows[colIndex]["FEXPID"].ToString();
                string FDeptName   = "";
                string FSDate      = this.View.OpenParameter.GetCustomParameter("FSDate") == null ? "" :
                                     this.View.OpenParameter.GetCustomParameter("FSDate").ToString();
                string FEDate = this.View.OpenParameter.GetCustomParameter("FEDate") == null ? "" :
                                this.View.OpenParameter.GetCustomParameter("FEDate").ToString();
                string FOrgId = this.View.OpenParameter.GetCustomParameter("FOrgId") == null ? "0" :
                                this.View.OpenParameter.GetCustomParameter("FOrgId").ToString();
                string FAccountId = this.View.OpenParameter.GetCustomParameter("FAccountId") == null ? "0" :
                                    this.View.OpenParameter.GetCustomParameter("FAccountId").ToString();

                DynamicFormShowParameter param = new DynamicFormShowParameter();
                param.ParentPageId       = this.View.PageId;
                param.FormId             = "ora_VounterDetail";
                param.OpenStyle.ShowType = ShowType.Modal;

                param.CustomParams.Add("FSDate", FSDate);
                param.CustomParams.Add("FEDate", FEDate);
                param.CustomParams.Add("FOrgId", FOrgId);
                param.CustomParams.Add("FAccountId", FAccountId);
                param.CustomParams.Add("FDeptName", FDeptName);
                param.CustomParams.Add("FCostItemId", FCostItemId);

                this.View.ShowForm(param);
            }
        }
Exemple #11
0
 /// <summary>
 /// 弹出动态表单,录入大晶点,返回值
 /// </summary>
 /// <param name="e"></param>
 public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e)
 {
     base.AfterEntryBarItemClick(e);
     if (e.BarItemKey.EqualsIgnoreCase("SZXY_tbGelPosition"))//F_SZXY_BigCrystalLoc
     {
         int    m          = this.Model.GetEntryCurrentRowIndex("F_SZXY_XYCPJYEntity");
         string crystalLoc = Convert.ToString(this.Model.GetValue("F_SZXY_BigCrystalLoc", m));
         if (crystalLoc.IsNullOrEmptyOrWhiteSpace())
         {
             crystalLoc = "";
         }
         DynamicFormShowParameter showParam = new DynamicFormShowParameter
         {
             FormId            = "SZXY_GelData",//晶点
             ShowMaxButton     = false,
             HiddenCloseButton = true
         };
         showParam.CustomParams.Add("value", crystalLoc);
         this.View.ShowForm(showParam,
                            new Action <FormResult>((returnData) =>
         {
             // 获取列表返回的数据
             if (returnData == null || returnData.ReturnData == null)
             {
                 return;
             }
             // AScanReturnInfo listData =(AScanReturnInfo)returnData.ReturnData;//
             //if (!listData.Value.IsNullOrEmptyOrWhiteSpace())
             //{
             //    this.Model.SetValue("F_SZXY_BigCrystalLoc", listData.Value, m);
             //    this.View.UpdateView("F_SZXY_XYCPJYEntity");
             //}
             if (!returnData.ReturnData.ToString().IsNullOrEmptyOrWhiteSpace())
             {
                 this.Model.SetValue("F_SZXY_BigCrystalLoc", returnData.ReturnData.ToString(), m);
                 this.View.UpdateView("F_SZXY_XYCPJYEntity");
             }
         }));
     }
 }
Exemple #12
0
        public override void BarItemClick(BarItemClickEventArgs e)
        {
            base.BarItemClick(e);

            switch (e.BarItemKey)
            {
            case "tbPlaceOrderFedx":
                //SaveLogisticsLocus(this.Context);
                List <DeliveryNotice>       notices = GetDeliveryNotices(this.Context);
                HttpResponseResult          result  = null;
                Dictionary <string, Object> dict    = ShipWebService.GetLogisticsDetail <Object>(this.Context, notices);
                foreach (var item in dict)
                {
                    if (item.Key.CompareTo("notices") == 0)
                    {
                        notices = (List <DeliveryNotice>)item.Value;
                    }
                    if (item.Key.CompareTo("result") == 0)
                    {
                        result = (HttpResponseResult)item.Value;
                    }
                }
                SaveLogisticsTrace(this.Context, notices);

                UpdateShipment(this.Context, notices);
                //ShowMessage(this.Context, result);
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();

                showParam.CustomParams.Add("trackingNumber", JsonConvert.SerializeObject(GetCarryNos(notices)));
                showParam.FormId = "HS_SELECTPRINTER";

                this.View.ShowForm(showParam);

                //SaveLogisticsLocus(this.Context,notices);


                break;
            }
        }
 public override void AfterButtonClick(AfterButtonClickEventArgs e)
 {
     base.AfterButtonClick(e);
     if (e.Key.Equals("F_ORA_DETAIL_VIEW_PUBLIC"))
     {
         if (this.View.Model.GetValue("FContractParty") == null)
         {
             this.View.ShowErrMessage("请先选择往来单位");
         }
         else
         {
             DynamicFormShowParameter param = new DynamicFormShowParameter();
             param.ParentPageId       = this.View.PageId;
             param.FormId             = "ora_trasaction_detail_public_form";
             param.OpenStyle.ShowType = ShowType.Modal;
             param.CustomParams.Add("Type", this.View.Model.GetValue("FContractPartyType").ToString());
             param.CustomParams.Add("ObjId", (this.View.Model.GetValue("FContractParty") as DynamicObject)["Id"].ToString());
             this.View.ShowForm(param);
         }
     }
     else if (e.Key.Equals("F_ORA_DETAIL_VIEW"))
     {
         if (this.View.Model.GetValue("FApply") == null)
         {
             this.View.ShowErrMessage("请先选择申请人");
         }
         else
         {
             DynamicFormShowParameter param = new DynamicFormShowParameter();
             param.ParentPageId       = this.View.PageId;
             param.FormId             = "ora_transaction_detail_form";
             param.OpenStyle.ShowType = ShowType.Modal;
             param.CustomParams.Add("Type", "emp");
             param.CustomParams.Add("ObjId", (this.View.Model.GetValue("FApply") as DynamicObject)["Id"].ToString());
             this.View.ShowForm(param);
         }
     }
 }
Exemple #14
0
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            base.EntityRowDoubleClick(e);

            if (e.Key.EqualsIgnoreCase("FEntity"))
            {
                DynamicObject dyo;
                int           selectedRow = 0;
                this.Model.TryGetEntryCurrentRow("FEntity", out dyo, out selectedRow);
                if (dyo != null)
                {
                    if (dyo["F_PAE_ItemName"].IsNullOrEmptyOrWhiteSpace())
                    {
                        this.View.ShowErrMessage("商品名称不能为空");
                        return;
                    }

                    DynamicFormShowParameter param = new DynamicFormShowParameter();
                    param.FormId = "PAE_ZyDemoBase2";
                    param.CustomComplexParams.Add("SelectItem", dyo);

                    this.View.ShowForm(param, (result) =>
                    {
                        if (result != null)
                        {
                            DynamicObject resultDyo = result.ReturnData as DynamicObject;
                            if (resultDyo == null)
                            {
                                return;
                            }
                            this.Model.SetValue("F_PAE_ItemName", resultDyo["F_PAE_ItemName"]);
                            this.Model.SetValue("F_PAE_Price", resultDyo["F_PAE_Price"]);
                            this.Model.SetValue("F_PAE_Quantity", resultDyo["F_PAE_Quantity"]);
                        }
                    });
                }
            }
        }
Exemple #15
0
        /// <summary>
        /// 显示表单
        /// </summary>
        /// <param name="view"></param>
        /// <param name="panelKey"></param>
        /// <returns></returns>
        public static void ShowForm(this IDynamicFormView view, string formId, string panelKey = null, string pageId = null, Action <FormResult> callback = null, Action <DynamicFormShowParameter> showParaCallback = null)
        {
            DynamicFormShowParameter showPara = new DynamicFormShowParameter();

            showPara.PageId       = string.IsNullOrWhiteSpace(pageId) ? Guid.NewGuid().ToString() : pageId;
            showPara.ParentPageId = view.PageId;
            if (string.IsNullOrWhiteSpace(panelKey))
            {
                showPara.OpenStyle.ShowType = ShowType.Default;
            }
            else
            {
                showPara.OpenStyle.ShowType = ShowType.InContainer;
                showPara.OpenStyle.TagetKey = panelKey;
            }
            showPara.FormId            = formId;
            showPara.OpenStyle.CacheId = pageId;
            if (showParaCallback != null)
            {
                showParaCallback(showPara);
            }

            view.ShowForm(showPara, callback);
        }
Exemple #16
0
        /// <summary>
        /// 显示销售员货款详情
        /// </summary>
        /// <param name="FSellerID">为0值时显示所有的销售员详情</param>
        private void Act_ShowSellerDetail(string FSellerID)
        {
            string FSDate      = this.View.Model.GetValue("FSDate") == null ? "" : this.View.Model.GetValue("FSDate").ToString();
            string FEDate      = this.View.Model.GetValue("FEDate") == null ? "" : this.View.Model.GetValue("FEDate").ToString();
            string FQDeptId    = this.View.Model.GetValue("FQDeptId") == null ? "0" : (this.View.Model.GetValue("FQDeptId") as DynamicObject)["Id"].ToString();
            string FQSalerId   = this.View.Model.GetValue("FQSalerId") == null ? "0" : (this.View.Model.GetValue("FQSalerId") as DynamicObject)["Id"].ToString();
            string FQCustId    = this.View.Model.GetValue("FQCustId") == null ? "0" : (this.View.Model.GetValue("FQCustId") as DynamicObject)["Id"].ToString();
            string FQFactoryId = this.View.Model.GetValue("FQFactoryId") == null ? "0" : (this.View.Model.GetValue("FQFactoryId") as DynamicObject)["Id"].ToString();
            string FQOrderNo   = this.View.Model.GetValue("FQOrderNo") == null ? "" : this.View.Model.GetValue("FQOrderNo").ToString().Trim();
            var    para        = new DynamicFormShowParameter();

            para.FormId             = "ora_PMT_SalesmanItemPmt";
            para.OpenStyle.ShowType = ShowType.Modal;
            para.ParentPageId       = this.View.PageId;
            para.CustomParams.Add("FSDate", FSDate);
            para.CustomParams.Add("FEDate", FEDate);
            para.CustomParams.Add("FSellerID", FSellerID);
            para.CustomParams.Add("FQDeptId", FQDeptId);
            para.CustomParams.Add("FQSalerId", FQSalerId);
            para.CustomParams.Add("FQCustId", FQCustId);
            para.CustomParams.Add("FQFactoryId", FQFactoryId);
            para.CustomParams.Add("FQOrderNo", FQOrderNo);
            this.View.ShowForm(para);
        }
Exemple #17
0
        /// <summary>
        /// 按钮事件
        /// </summary>
        /// <param name="e"></param>
        public override void BarItemClick(BarItemClickEventArgs e)
        {
            base.BarItemClick(e);
            if (e.BarItemKey == "tb_ImportFileUpdateEdit")
            {
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.OpenStyle.ShowType = ShowType.Modal;
                showParam.FormId             = "PAEZ_ICStockBillExproint";
                showParam.CustomParams.Add("CustomKey", "1001");
                this.View.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        bool Import = (bool)formResult.ReturnData;
                        if (Import)
                        {
                            //刷新list
                            this.ListView.RefreshByFilter();
                        }
                    }
                }));
            }

            if (e.BarItemKey == "tb_ImportFileUpdateEdit_Phone")
            {
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.OpenStyle.ShowType = ShowType.Modal;
                showParam.FormId             = "PAEZ_ICStockBillExproint";
                showParam.CustomParams.Add("CustomKey", "1002");
                this.View.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        bool Import = (bool)formResult.ReturnData;
                        if (Import)
                        {
                            this.ListView.RefreshByFilter();
                        }
                    }
                }));
            }

            if (e.BarItemKey == "tb_ImportFileUpdateEdit_2")
            {
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.OpenStyle.ShowType = ShowType.Modal;
                showParam.FormId             = "PAEZ_ICStockBillExproint_2";
                showParam.CustomParams.Add("CustomKey", "2001");

                this.View.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        bool Import = (bool)formResult.ReturnData;
                        if (Import)
                        {
                            this.ListView.RefreshByFilter();
                        }
                    }
                }));
            }

            if (e.BarItemKey == "tb_ImportFileUpdateEdit_2_Phone")
            {
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.OpenStyle.ShowType = ShowType.Modal;
                showParam.FormId             = "PAEZ_ICStockBillExproint_2";
                showParam.CustomParams.Add("CustomKey", "2002");

                this.View.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        bool Import = (bool)formResult.ReturnData;
                        if (Import)
                        {
                            this.ListView.RefreshByFilter();
                        }
                    }
                }));
            }

            if (e.BarItemKey == "btn_Excel")
            {
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.OpenStyle.ShowType = ShowType.Modal;
                showParam.FormId             = "PAEZ_EXCEL";
                showParam.CustomParams.Add("CustomKey", "3001");

                this.View.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        bool Import = (bool)formResult.ReturnData;
                        if (Import)
                        {
                            this.ListView.RefreshByFilter();
                        }
                    }
                }));
            }

            //导入转换率按钮
            if (e.BarItemKey == "ImportRateBtn")
            {
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.OpenStyle.ShowType = ShowType.Modal;
                showParam.FormId             = "PAEZ_RATE_EXCEL";
                this.View.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        bool Import = (bool)formResult.ReturnData;
                        if (Import)
                        {
                            this.ListView.RefreshByFilter();
                        }
                    }
                }));
            }
            //拣货查询
            if (e.BarItemKey == "tbPicking")
            {
                Context context = this.Context;
                DynamicFormShowParameter showParam = new DynamicFormShowParameter();
                showParam.OpenStyle.ShowType = ShowType.Modal;
                showParam.FormId             = "PAEZ_PickQuery";
                this.View.ShowForm(showParam,
                                   new Action <FormResult>((formResult) =>
                {
                    if (formResult != null && formResult.ReturnData != null)
                    {
                        object result = formResult.ReturnData;

                        ReturnInfo returnInfo = (ReturnInfo)formResult.ReturnData;      //数量

                        CalCulateOrderPlan calc = new CalCulateOrderPlan();

                        //Msg msg = Profits.IntoCostUnrealizedProfits(FConsolidationSchemeID, riqi, context);

                        ReturnParam returnParam = calc.GenerateSolutions(returnInfo, context);   //生成方案

                        if (returnParam.status)
                        {
                            BillShowParameter param = new BillShowParameter();
                            param.FormId            = returnParam.FBIZFORMID;
                            //param.Status = OperationStatus.ADDNEW;
                            param.Status = OperationStatus.EDIT;
                            param.PKey   = returnParam.FBUSINESSCODE;
                            this.View.ShowForm(param);
                        }
                        else
                        {
                            this.View.ShowErrMessage(returnParam.msg);
                            this.View.Refresh();
                        }
                    }
                }));
            }
        }
        /// <summary>
        /// 调用view的弹出界面
        /// </summary>
        /// <param name="param"></param>

        public void ShowForm(DynamicFormShowParameter param, Action <FormResult> action)
        {
            this.View.ShowForm(param, action);
        }