Esempio n. 1
0
        private void GridCellOnChanged_DoCustomerAction_Grid(object sender, GridCustomerPostBackEventArgs e)
        {
            part.IsDataBinding = true;
            part.IsConsuming   = true;
            part.DataCollect();//数据收集
            part.DataBinding();

            SO_SOLinesRecord soline = part.Model.Views["SO_SOLines"].Records[e.RowIndex] as SO_SOLinesRecord;

            if (soline != null)
            {
                if (!string.IsNullOrEmpty(soline.DescFlexField_PrivateDescSeg5))
                {
                    //外销价
                    decimal price = decimal.Parse(soline.DescFlexField_PrivateDescSeg5);

                    List <UIChangeInfoData> changeList = new List <UIChangeInfoData>();

                    string field = "FinallyPrice";

                    decimal newValue = price;                 //改后的价格

                    decimal oldValue = soline.FinallyPriceTC; //改前的价格

                    soline.FinallyPriceTC = price;

                    UFIDA.U9.PriceCal.PriceCalSV.UIChangeInfoData changeInfo = this.GetSOLineChangeInfoData(soline, field, newValue, oldValue);

                    changeList.Add(changeInfo);

                    SOUIModelAction soAction = part.Action as SOUIModelAction;
                    soAction.PerformCalculatePrice(changeList);//
                }
            }
        }
Esempio n. 2
0
        private UIChangeInfoData GetSOLineChangeInfoData(SO_SOLinesRecord soline, string field, object newValue, object oldValue)
        {
            SORecord         so     = part.Model.Views["SO"].FocusedRecord as SORecord;
            UIChangeInfoData change = new UIChangeInfoData();

            change.ObjectName = (int)UFIDA.U9.CBO.SCM.Enums.PriceObjectTypeEnumData.Line;
            change.ActionEnum = (int)UFIDA.U9.CBO.SCM.Enums.BusinessOperatorTypeEnumData.Update2;
            change.ID         = _strongPart.Action.GetRecordMarker(soline);
            change.OwnerID    = _strongPart.Action.GetRecordMarker(so);
            change.Sequence   = 1;
            change.FieldName  = field;
            change.NewValue   = newValue;
            change.OldValue   = oldValue;
            return(change);
        }