public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
 {
     base.EntityRowDoubleClick(e);
     currSelectedRow = e.Row - 1;
     OpenDetailedPage();
     //this.View.GetControl("FBJRow").SetCustomPropertyValue("forecolor", "#ffff99");
 }
Exemplo n.º 2
0
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            base.EntityRowDoubleClick(e);
            if (!e.Key.Equals(HeadEntityKey, StringComparison.CurrentCultureIgnoreCase))
            {
                return;
            }

            //通过row获取主键

            var headEntry = this.View.GetControl <EntryGrid>(HeadEntityKey);

            var headEntity = this.View.BusinessInfo.GetEntity(HeadEntityKey);
            var selectObj  = this.Model.GetEntityDataObject(headEntity, e.Row);

            if (selectObj == null || !selectObj.DynamicObjectType.Properties.Contains(HeadFidKey))
            {
                return;
            }

            this.Model.DeleteEntryData(DetailEntityKey);
            var headId = selectObj[HeadFidKey].ToString();
            //使用DataTable获取单据体信息
            string strSql    = string.Format(@"
                        SELECT 
                         T2.FNAME AS MATERIAL_NAME,
                         T3.FAMOUNT,
                         T0.FQTY
                         FROM  T_PUR_POORDERENTRY T0
                         INNER JOIN T_BD_MATERIAL T1 ON T0.FMATERIALID = T1.FMATERIALID
                         INNER JOIN T_BD_MATERIAL_L T2 ON T1.FMATERIALID = T2.FMATERIALID AND T2.FLOCALEID=2052
                         INNER JOIN T_PUR_POORDERENTRY_F T3 ON T0.FENTRYID = T3.FENTRYID
                         WHERE T0.FID ={0}", headId);
            var    entryData = DBServiceHelper.ExecuteDataSet(this.View.Context, strSql);

            if (entryData == null || entryData.Tables[0].Rows.Count == 0)
            {
                return;
            }

            for (int i = 0; i < entryData.Tables[0].Rows.Count; i++)
            {
                this.Model.CreateNewEntryRow(DetailEntityKey);
                var dr = entryData.Tables[0].Rows[i];

                var materialName = dr["MATERIAL_NAME"] ?? string.Empty;
                this.Model.SetValue(MaterialKey, materialName, i);

                var amount = dr["FAMOUNT"] ?? 0;
                this.Model.SetValue(AmountKey, amount, i);

                var qty = dr["FQTY"] ?? 0;
                this.Model.SetValue(QtyKey, qty, i);
            }

            this.View.UpdateView(DetailEntityKey);
        }
Exemplo n.º 3
0
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            base.EntityRowDoubleClick(e);
            ListShowParameter Parameter = new ListShowParameter();

            Parameter.FormId      = "STK_Inventory";
            Parameter.MultiSelect = false;
            Parameter.ListFilterParameter.Filter = "FMATERIALID = 100612";
            this.View.ShowForm(Parameter);
        }
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            base.EntityRowDoubleClick(e);
            string key = e.ColKey.ToUpperInvariant();

            switch (key)
            {
            case "FORDERNO":
                Act_ShowDeliverForm(e.Row);
                break;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 销售员货款,双击行打开明细
        /// </summary>
        /// <param name="e"></param>
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            base.EntityRowDoubleClick(e);
            string formId = this.View.GetFormId();

            if ("ora_PMT_SalesmanPmt".Equals(formId))
            {
                string FSellerID = this.View.Model.GetValue("FSellerID", e.Row) == null ? "0" :
                                   (this.View.Model.GetValue("FSellerID", e.Row) as DynamicObject)["Id"].ToString();
                Act_ShowSellerDetail(FSellerID);
            }
        }
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            string            FVoucherID = this.View.Model.GetValue("FVoucherID", e.Row).ToString();
            BillShowParameter param      = new BillShowParameter();

            param.ParentPageId       = this.View.PageId;
            param.FormId             = "GL_VOUCHER";
            param.PKey               = FVoucherID;
            param.Status             = OperationStatus.VIEW;
            param.OpenStyle.ShowType = ShowType.Modal;
            this.View.ShowForm(param);
        }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
0
 public override void EntityRowClick(EntityRowClickEventArgs e)
 {
     if (this.isClicked)
     {
         if (e.Key.Equals("FEntityAction", StringComparison.OrdinalIgnoreCase))
         {
             this.ShowErrTypeInfo();
         }
         else if (e.Key.Equals("FEntityErrType", StringComparison.OrdinalIgnoreCase))
         {
             this.ShowErrInfo();
         }
     }
 }
        public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
        {
            base.EntityRowDoubleClick(e);
            string key = e.ColKey.ToUpperInvariant();

            switch (key)
            {
            case "F_ORA_SALENO":
                var para = new BillShowParameter();
                para.FormId             = "SAL_SaleOrder";
                para.OpenStyle.ShowType = ShowType.Modal;
                para.ParentPageId       = this.View.PageId;
                para.Status             = OperationStatus.VIEW;
                para.PKey = this.Model.GetValue("F_ora_inner_code", e.Row).ToString();
                this.View.ShowForm(para);
                break;
            }
        }
Exemplo n.º 10
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"]);
                        }
                    });
                }
            }
        }
Exemplo n.º 11
0
 public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
 {
     base.EntityRowDoubleClick(e);
 }
Exemplo n.º 12
0
        public override void EntityRowClick(EntityRowClickEventArgs e)
        {
            base.EntityRowClick(e);

            this.View.GetMainBarItem("tbSNew").Enabled = false;
        }
Exemplo n.º 13
0
 public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
 {
     base.EntityRowDoubleClick(e);
     currSelectedRow = e.Row - 1;
     OpenDetailedPage();
 }
 public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
 {
     base.EntityRowDoubleClick(e);
     OpenPsnReportForm();
 }