public void btnNavS_Click(object sender, EventArgs e)
        {
            CostAccountantPart.CurrentState[UserDefAllocRateAccountUIFormWebPart.Const_UserDef_AccountPeriod]      = null;
            CostAccountantPart.CurrentState[UserDefAllocRateAccountUIFormWebPart.Const_UserDef_AccountPeriod_Code] = null;
            CostAccountantPart.CurrentState[UserDefAllocRateAccountUIFormWebPart.Const_UserDef_AccountPeriod_Name] = null;

            this.CostAccountantPart.Model.ClearErrorMessage();
            IUIRecord record = this.CostAccountantPart.Model.Views["UserDefAllocRate"].FocusedRecord;

            if (record != null && record["Code"] != null)
            {
                NameValueCollection nvs = new NameValueCollection();
                //if (this.CostAccountantPart != null && this.CostAccountantPart.Model != null && this.CostAccountantPart.Model.Views.Count != 0 && this.CostAccountantPart.Model.Views != null)
                //{
                //    nvs.Add("UserID", this.CostAccountantPart.Model.Views["UserDefAllocRate"].FocusedRecord["ID"].ToString());
                //    nvs.Add("UserCode", this.CostAccountantPart.Model.Views["UserDefAllocRate"].FocusedRecord["Code"].ToString());
                //    nvs.Add("UserName", this.CostAccountantPart.Model.Views["UserDefAllocRate"].FocusedRecord["Name"].ToString());
                //}
                this.CostAccountantPart.ShowAtlasModalDialog(this.btnRefresh, "22da09ae-62d2-409d-a05b-83264d122583", "查询", "400", "200", "", nvs, false, false, false);
            }
            else
            {
                this.CostAccountantPart.Model.ErrorMessage.Message = ("编码不能为空!");
            }
        }
Пример #2
0
        public void btnPlugIn_Click(object sender, EventArgs e)
        {
            IUIRecord headRec = uiPart.Model.Views["PayBillHead"].FocusedRecord;

            if (headRec == null)
            {
                return;
            }
            //查询OA的流程ID
            string  sql      = string.Format(@"SELECT DescFlexField_PrivateDescSeg1 AS OAFlowID
                        FROM dbo.AP_PayBillHead WHERE ID={0}", headRec["ID"].ToString());
            DataSet ds       = new DataSet();
            string  OAFlowID = "";

            DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                OAFlowID = row["OAFlowID"].ToString();
            }
            string UserCode       = PDContext.Current.UserCode;
            string UserCodeBase64 = CommonFunction.Base64Encode(Encoding.UTF8, UserCode);
            string OAIP           = CommonFunction.GetOAIP();
            string url            = "http://" + OAIP + string.Format("/Auctus/jsp/WorkflowSSO.jsp?usercode={0}&requestid={1}", HttpUtility.UrlEncode(UserCodeBase64, Encoding.UTF8), OAFlowID);
            string script1        = "<script language=\"javascript\">";

            script1 += string.Format(" window.open(\"{0}\");", url);
            script1 += "</script>";
            AtlasHelper.RegisterAtlasStartupScript
                ((Control)this.uiPart.TopLevelContainer, this.uiPart.GetType(), "ReferenceReturn", script1, false);
        }
Пример #3
0
        /// <summary>
        /// 查看OA流程按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnOAFlow_Click(object sender, EventArgs e)
        {
            IUIRecord headRec = uiPart.Model.Views["MO"].FocusedRecord;

            if (headRec == null)
            {
                return;
            }
            //查询OA的流程ID
            string  sql      = string.Format(@"SELECT DescFlexField_PrivateDescSeg7 AS OAFlowID
                        FROM dbo.MO_MO WHERE ID={0}", headRec["ID"].ToString());
            DataSet ds       = new DataSet();
            string  OAFlowID = "";

            DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                OAFlowID = row["OAFlowID"].ToString();
            }
            string userCode = PDContext.Current.UserCode;
            //OA流程页面Url
            string script1 = PubFunction.GetOAFlowScript(userCode, OAFlowID);

            AtlasHelper.RegisterAtlasStartupScript
                ((Control)this.uiPart.TopLevelContainer, this.uiPart.GetType(), "ReferenceReturn", script1, false);
        }
Пример #4
0
        /// <summary>
        /// 页面加载后事件
        /// </summary>
        /// <param name="Part"></param>
        /// <param name="args"></param>
        public override void AfterRender(IPart Part, EventArgs args)
        {
            base.AfterRender(Part, args);
            IUFControl btnCustSubmit  = CommonFunction.FindControl(Part, "Card4", "btnCustSubmit");
            IUFControl btnOAFlow      = CommonFunction.FindControl(Part, "Card4", "btnOAFlow");
            IUFControl btnQuickCreate = CommonFunction.FindControl(Part, "Card4", "btnQuickCreate");
            IUIRecord  rec            = uiPart.Model.Views["MOModify"].FocusedRecord;

            if (rec != null && Convert.ToInt64(rec["ID"].ToString()) > 0)
            {
                //btnQuickCreate
                //查询OA的流程ID
                string  sql          = string.Format(@"SELECT a.DescFlexField_PrivateDescSeg2 IsBackFromOA,a.DescFlexField_PrivateDescSeg3 OAFlowID 
,b.DescFlexField_PrivateDescSeg1 IsToOA
FROM dbo.MO_MOModify a INNER JOIN dbo.MO_MOModifyDocType b ON a.MOModifyDocType=b.ID
WHERE a.ID={0}", rec["ID"].ToString());
                DataSet ds           = new DataSet();
                string  OAFlowID     = "";
                string  IsBackFromOA = "";
                string  IsToOA       = "";
                DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    IsBackFromOA = row["IsBackFromOA"].ToString();
                    OAFlowID     = row["OAFlowID"].ToString();
                    IsToOA       = row["IsToOA"].ToString();
                }
                if (IsToOA == "1")                      //触发到OA
                {
                    if (string.IsNullOrEmpty(OAFlowID)) //未提交
                    {
                        btnQuickCreate.Enabled = true;
                        btnOAFlow.Enabled      = false;
                        btnCustSubmit.Enabled  = false;
                    }
                    else
                    {
                        if (IsBackFromOA == "是")//从OA退回到,允许再次提交
                        {
                            btnQuickCreate.Enabled = true;
                            btnCustSubmit.Enabled  = true;
                            btnOAFlow.Enabled      = true;
                        }
                        else
                        {
                            btnCustSubmit.Enabled  = false;
                            btnQuickCreate.Enabled = false;
                            btnOAFlow.Enabled      = true;
                        }
                    }
                }
                else
                {
                    btnOAFlow.Enabled     = false;
                    btnCustSubmit.Enabled = false;
                }
            }
        }
Пример #5
0
        public override void AfterRender(IPart Part, EventArgs args)
        {
            base.AfterRender(Part, args);
            IUFControl ctrl = CommonFunction.FindControl(Part, "Card0", "btnForPlugIn");

            if (ctrl != null)
            {
                IUIRecord rec = uiPart.Model.Views["MiscShipment"].FocusedRecord;
                if (rec != null && Int64.Parse(rec["ID"].ToString()) > 0)
                {
                    ctrl.Enabled = true;
                }
                else
                {
                    ctrl.Enabled = false;
                }
                if (ctrl.Enabled)
                {
                    //查询OA的流程ID
                    string  sql      = string.Format(@"SELECT DescFlexField_PrivateDescSeg3 AS OAFlowID
                        FROM dbo.InvDoc_MiscShip WHERE ID={0}", rec["ID"].ToString());
                    DataSet ds       = new DataSet();
                    string  OAFlowID = "";
                    DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        OAFlowID = row["OAFlowID"].ToString();
                    }
                    if (string.IsNullOrEmpty(OAFlowID))//不存在OA流程
                    {
                        ctrl.Enabled = false;
                    }
                    else
                    {
                        ctrl.Enabled = true;//OA流程按钮可用
                        //审核按钮设置不可用
                        IUFControl btnApprove = CommonFunction.FindControl2(Part, "Toolbar2", "BtnApprove");
                        if (btnApprove != null)
                        {
                            btnApprove.Enabled = false;
                        }
                        if (rec["Status"].ToString() == "1")
                        {
                            IUFControl btnDelete = CommonFunction.FindControl2(Part, "Toolbar2", "BtnDelete");
                            if (btnDelete != null)
                            {
                                btnDelete.Enabled = false;
                            }
                        }
                    }
                }
            }
        }
Пример #6
0
        internal static string GetMainID(IList <IUIRecord> selectedSecords)
        {
            if (selectedSecords.Count == 0)
            {
                return("ID");
            }
            IUIRecord record = selectedSecords[0];

            if (record["MainID"] == null || record["MainID"].ToString().Length == 0)
            {
                return("ID");
            }
            return("MainID");
        }
Пример #7
0
        public override void AfterEventProcess(IPart Part, string eventName, object sender, EventArgs args)
        {
            base.AfterEventProcess(Part, eventName, sender, args);
            uiPart = Part;
            UFWebButton4ToolbarAdapter adapter = sender as UFWebButton4ToolbarAdapter;
            IUIRecord porec = uiPart.Model.Views["PayBillHead"].FocusedRecord;

            //弃审后,更新标记
            if ((adapter != null) && (adapter.Action == "UnApproveClick"))
            {
                ILogger logger = LoggerManager.GetLogger(typeof(CacheManager));
                logger.Error(string.Format("单号为:{0}的付款单弃审了!", porec["DocNo"].ToString()));
                //string UpSQL = string.Format(@"UPDATE InvDoc_MiscShip set DescFlexField_PrivateDescSeg3='' WHERE ID = {0}", porec["ID"].ToString());
                //DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), UpSQL, null);
            }
        }
        private void BtnOk_Click_Extend(object sender, EventArgs e)
        {
            this.Model.ClearErrorMessage();
            //获取条码基础部分
            GetBaseBarCodeProxy getBaseBarCode = new GetBaseBarCodeProxy();

            getBaseBarCode.ItemCode     = this.FocusedRecord.Item_Code;
            getBaseBarCode.SegLength    = this.FocusedRecord.ActualLength;
            getBaseBarCode.BusinessDate = this.FocusedRecord.BusinessDate;
            getBaseBarCode.OperatorCode = this.FocusedRecord.Operators_Code;
            string baseBarCode = getBaseBarCode.Do();
            //获取流水号
            GetBarCodeFlowNoProxy getFlowNo = new GetBarCodeFlowNoProxy();

            getFlowNo.BaseBarCode = baseBarCode;
            int flowNo = getFlowNo.Do();

            //设置条码
            this.FocusedRecord.BarCode = string.Format("{0}{1:000}", baseBarCode, flowNo);

            int qty = this.FocusedRecord.Qty ?? 0;

            if (qty <= 0)
            {
                IUIRecord record = this.FocusedRecord;
                this.Model.ErrorMessage.SetErrorMessage(ref record, this.Model.CompleteApplyBarCode.FieldQty.Name, "盘数必须大于0");
                return;
            }

            for (int i = 0; i < qty - 1; i++)
            {
                CompleteApplyBarCodeRecord newRecord = this.Model.CompleteApplyBarCode.AddNewUIRecord();
                this.FocusedRecord.CopyTo(newRecord);
                newRecord.BarCode         = string.Format("{0}{1:000}", baseBarCode, ++flowNo);
                newRecord.DataRecordState = DataRowState.Added;
            }

            this.Action.CommonAction.Save();
            BtnOk_Click_DefaultImpl(sender, e);
            if (!this.Model.ErrorMessage.hasErrorMessage)
            {
                this.CurrentState["RefreshData"] = true;
                this.CloseDialog(true);
            }
        }
Пример #9
0
        /// <summary>
        /// 打开OA流程页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnOAFlow_Click(object sender, EventArgs e)
        {
            IUIRecord rec      = uiPart.Model.Views["CompleteRpt"].FocusedRecord;
            string    sql      = string.Format(@"SELECT  a.DescFlexField_PrivateDescSeg2 OAFlowID 
FROM dbo.mo_completerpt a WHERE a.ID={0}", rec["ID"].ToString());
            DataSet   ds       = new DataSet();
            string    OAFlowID = "";

            DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                OAFlowID = row["OAFlowID"].ToString();
            }
            string script = PubFunction.GetOAFlowScript(PDContext.Current.UserCode, OAFlowID);//打开流程页面脚本

            AtlasHelper.RegisterAtlasStartupScript
                ((Control)this.uiPart.TopLevelContainer, this.uiPart.GetType(), "ReferenceReturn", script, false);
        }
        public void btnRefresh_Click(object sender, EventArgs e)
        {
            IUIRecord record = this.CostAccountantPart.Model.Views["UserDefAllocRate"].FocusedRecord;

            if (record != null)
            {
                long   userRateID      = PubClass.GetLong(record["ID"]);
                string strUserRateCode = PubClass.GetString(record["Code"]);

                if (!PubClass.IsNull(strUserRateCode))
                {
                    long   accID      = PubClass.GetLong(CostAccountantPart.CurrentState[UserDefAllocRateAccountUIFormWebPart.Const_UserDef_AccountPeriod]);
                    string strAccCode = PubClass.GetString(CostAccountantPart.CurrentState[UserDefAllocRateAccountUIFormWebPart.Const_UserDef_AccountPeriod_Code]);
                    string strAccName = PubClass.GetString(CostAccountantPart.CurrentState[UserDefAllocRateAccountUIFormWebPart.Const_UserDef_AccountPeriod_Name]);

                    //GetNumAllocationDTOData getnumBP = new GetNumAllocationDTOData();
                    //if (userCode == "001")
                    //{
                    //    getnumBP.IsCarLoad = true;
                    //}
                    //else
                    //{
                    //    getnumBP.IsCarLoad = false;
                    //}
                    //getnumBP.AccountingPeriodID = this.CurrentModel.AccountingPeriodView.FocusedRecord.AccountingPeriod.GetValueOrDefault();
                    //getnumBP.UserDefAllocRateID = Convert.ToInt64(userID);

                    //new GetNumAllocationBPProxy
                    //{
                    //    InDTO = getnumBP
                    //}.Do();

                    GetNumAllocationBPProxy proxy = new GetNumAllocationBPProxy();
                    proxy.AccountPeriod      = accID;
                    proxy.UserDefAllocRateID = userRateID;
                    proxy.UserRateCode       = strUserRateCode;

                    proxy.Do();


                    ((BaseAction)this.CostAccountantPart.Action).NavigateAction.Refresh(null);
                }
            }
        }
        private void BtnPrintBarCode_Click_Extend(object sender, EventArgs e)
        {
            this.Model.ClearErrorMessage();
            IList <IUIRecord> selectedRecords = this.Model.CompleteApplyBarCode.Cache.GetSelectRecord();

            if (selectedRecords == null || selectedRecords.Count == 0)
            {
                IUIModel model = this.Model;
                this.Model.ErrorMessage.SetErrorMessage(ref model, "没有选择需要打印条码的记录!");
                return;
            }

            bool checkFail = false;

            foreach (CompleteApplyBarCodeRecord selectedRecord in selectedRecords)
            {
                //打印外包装允许可以打印条码2次,否则只能允许打印1次
                if (((selectedRecord.IsPrintWrapper ?? false) && selectedRecord.PrintCount >= 2) || (!(selectedRecord.IsPrintWrapper ?? false) && selectedRecord.PrintCount >= 1))
                {
                    IUIRecord record       = selectedRecord;
                    string    errorMessage = string.Format("条码{0}已经超出打印次数,不允许打印", selectedRecord.BarCode);
                    this.Model.ErrorMessage.SetErrorMessage(ref record, "", errorMessage);
                    checkFail = true;
                }
            }
            if (checkFail)
            {
                return;
            }

            UIActionEventArgs args     = new UIActionEventArgs();
            IExportSettings   settings = ExportServiceFactory.GetInstance().CreateExportSettingsObject();

            settings.PrintTemplateCatalogType = printTemplateCatalogType;
            settings.UserDataCallBack         = DataCallBackHandle;
            // 打印完成委托
            settings.OnFinished = new FinishCallBackHandle(FinishCallBackHandle);
            args.Tag            = settings;

            CommandFactory.DoCommand("OnPrint", this.Action, sender, args);

            BtnPrintBarCode_Click_DefaultImpl(sender, e);
        }
Пример #12
0
        /// <summary>
        /// 查看OA交期变更报表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnOAMOModify_Click(object sender, EventArgs e)
        {
            IUIRecord headRec = uiPart.Model.Views["MO"].FocusedRecord;

            if (headRec == null)
            {
                return;
            }
            string userCode = PDContext.Current.UserCode;
            //OA流程页面Url
            string UserCodeBase64 = CommonFunction.Base64Encode(Encoding.UTF8, userCode);
            string OAIP           = CommonFunction.GetOAIP();
            string url            = "http://" + OAIP + string.Format("/Auctus/jsp/ModifyDoc.jsp?usercode={0}", System.Web.HttpUtility.UrlEncode(UserCodeBase64, Encoding.UTF8));
            string script1        = "<script language=\"javascript\">";

            script1 += string.Format(" window.open(\"{0}\");", url);
            script1 += "</script>";
            AtlasHelper.RegisterAtlasStartupScript
                ((Control)this.uiPart.TopLevelContainer, this.uiPart.GetType(), "ReferenceReturn", script1, false);
        }
Пример #13
0
        public override void AfterRender(IPart Part, EventArgs args)
        {
            base.AfterRender(Part, args);
            IUFControl ctrl = CommonFunction.FindControl(Part, "Card0", "btnForPlugIn");

            if (ctrl != null)
            {
                IUIRecord rec = uiPart.Model.Views["PayBillHead"].FocusedRecord;
                if (rec != null && Int64.Parse(rec["ID"].ToString()) > 0)
                {
                    ctrl.Enabled = true;
                }
                else
                {
                    ctrl.Enabled = false;
                }
                if (ctrl.Enabled)
                {
                    //查询OA的流程ID
                    string  sql      = string.Format(@"SELECT DescFlexField_PrivateDescSeg1 AS OAFlowID
                        FROM dbo.AP_PayBillHead WHERE ID={0}", rec["ID"].ToString());
                    DataSet ds       = new DataSet();
                    string  OAFlowID = "";
                    DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        OAFlowID = row["OAFlowID"].ToString();
                    }
                    if (string.IsNullOrEmpty(OAFlowID))
                    {
                        ctrl.Enabled = false;
                    }
                    else
                    {
                        ctrl.Enabled = true;
                    }
                }
            }
        }
Пример #14
0
        public override void AfterEventProcess(IPart Part, string eventName, object sender, EventArgs args)
        {
            base.AfterEventProcess(Part, eventName, sender, args);
            uiPart = Part;
            UFWebButton4ToolbarAdapter adapter = sender as UFWebButton4ToolbarAdapter;
            IUIRecord porec = uiPart.Model.Views["MiscShipment"].FocusedRecord;

            //弃审后,更新标记
            if ((adapter != null) && porec != null && Int64.Parse(porec["ID"].ToString()) > 0)
            {
                //if (porec["Status"].ToString() == "1")
                //{
                //    //查询OA的流程ID
                //    string sql = string.Format(@"SELECT b.DescFlexField_PrivateDescSeg1 AS IsOA
                //        FROM dbo.InvDoc_MiscShip a inner join InvDoc_MiscShipDocType b on a.MiscShipDocType=b.ID WHERE a.ID={0}", porec["ID"].ToString());
                //    DataSet ds = new DataSet();
                //    string IsOA = "";
                //    DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
                //    foreach (DataRow row in ds.Tables[0].Rows)
                //    {
                //        IsOA = row["IsOA"].ToString();
                //    }
                //    if (IsOA == "1")
                //    {
                //        //if ((adapter.Action == "ApproveClick"))
                //        //{
                //        //    throw new Exception("U9审核无效,此单据类型只能在OA中审核!");
                //        //    //string UpSQL = string.Format(@"UPDATE InvDoc_MiscShip set DescFlexField_PrivateDescSeg3='' WHERE ID = {0}", porec["ID"].ToString());
                //        //    //DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), UpSQL, null);
                //        //}
                //        if (adapter.Action == "DeleteClick")
                //        {
                //            throw new Exception("核准中的单据不能删除!");
                //        }
                //    }
                //}
            }
        }
Пример #15
0
        /// <summary>
        /// 页面加载后事件
        /// </summary>
        /// <param name="Part"></param>
        /// <param name="args"></param>
        public override void AfterRender(IPart Part, EventArgs args)
        {
            base.AfterRender(Part, args);
            IUFControl ctrl = CommonFunction.FindControl(Part, "Card1", "btnOAFlow");

            if (ctrl != null)
            {
                IUIRecord rec = uiPart.Model.Views["MO"].FocusedRecord;
                if (rec != null && Int64.Parse(rec["ID"].ToString()) > 0)
                {
                    ctrl.Enabled = true;
                }
                else
                {
                    ctrl.Enabled = false;
                }
                if (ctrl.Enabled)
                {
                    //查询OA的流程ID
                    string  sql      = string.Format(@"SELECT a.DocState,a.DescFlexField_PrivateDescSeg7 AS OAFlowID,b.DescFlexField_PrivateDescSeg1 IsToOA
                        FROM dbo.MO_MO a INNER JOIN dbo.MO_MODocType b ON a.MODocType=b.ID WHERE a.ID={0}", rec["ID"].ToString());
                    DataSet ds       = new DataSet();
                    string  OAFlowID = "";
                    string  IsToOA   = "";
                    string  docState = "";
                    DataAccessor.RunSQL(DatabaseManager.GetCurrentConnection(), sql, null, out ds);
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        OAFlowID = row["OAFlowID"].ToString();
                        IsToOA   = row["IsToOA"].ToString();
                        docState = row["DocState"].ToString();
                    }
                    if (IsToOA == "1")
                    {
                        IUFToolbar bar = (IUFToolbar)Part.GetUFControlByName(Part.TopLevelContainer, "Toolbar1");
                        foreach (IUFControl ctrl1 in bar.Controls)
                        {
                            switch (ctrl1.ID)
                            {
                            case "BtnApprove":
                                ctrl1.Enabled = false;
                                break;

                            case "BtnDelete":
                                if (docState == "4")
                                {
                                    ctrl1.Enabled = false;
                                }
                                break;

                            case "BtnSave":
                                if (docState == "4")
                                {
                                    ctrl1.Enabled = false;
                                }
                                break;

                            default:
                                break;
                            }
                        }
                        //OA流程的工单,审核中不允许修改
                    }
                    if (string.IsNullOrEmpty(OAFlowID))
                    {
                        ctrl.Enabled = false;
                    }
                    else
                    {
                        ctrl.Enabled = true;
                    }
                }
            }
        }
Пример #16
0
        public override void AfterEventProcess(UFSoft.UBF.UI.IView.IPart Part, string eventName, object sender, EventArgs args)
        {
            base.AfterEventProcess(Part, eventName, sender, args);
            //if (UFIDA.U9.UI.PDHelper.PDContext.Current.OrgRef.CodeColumn != "J002") return;//组织必须等于贸易中心  "1001411156753998"
            if (!UFIDA.U9.Cust.GS.FT.PlugInUI.PubHelperUI.SOUIHelperExtend.IsTradeCenterOrg())
            {
                return;                                                                               //组织必须等于贸易中心
            }
            string strMeg = string.Empty;

            UFSoft.UBF.UI.WebControlAdapter.UFWebButton4ToolbarAdapter webButton = sender as UFSoft.UBF.UI.WebControlAdapter.UFWebButton4ToolbarAdapter;
            #region//复制按钮
            if (webButton != null && webButton.Action == "CopyClick")
            {
                part = Part;
                IUIRecord record = this.part.Model.Views["SO"].FocusedRecord;
                if (record != null)
                {
                    if (!string.IsNullOrEmpty(record["DescFlexField_PrivateDescSeg5"] + ""))
                    {
                        record["DescFlexField_PrivateDescSeg5"] = string.Empty;
                    }
                    if (!string.IsNullOrEmpty(record["DescFlexField_PrivateDescSeg6"] + ""))
                    {
                        record["DescFlexField_PrivateDescSeg6"] = string.Empty;
                    }
                    if (!string.IsNullOrEmpty(record["DescFlexField_PrivateDescSeg7"] + ""))
                    {
                        record["DescFlexField_PrivateDescSeg7"] = string.Empty;
                    }
                    if (!string.IsNullOrEmpty(record["DescFlexField_PrivateDescSeg8"] + ""))
                    {
                        record["DescFlexField_PrivateDescSeg8"] = string.Empty;
                    }
                    //是否折扣
                    if (!string.IsNullOrEmpty(record["DescFlexField_PrivateDescSeg1"] + ""))
                    {
                        record["DescFlexField_PrivateDescSeg1"] = "false";
                    }
                    IUIRecordCollection records = this.part.Model.Views["SO_SOLines"].Records;
                    foreach (IUIRecord curRecord in records)
                    {
                        if (!string.IsNullOrEmpty(curRecord["DescFlexField_PrivateDescSeg2"] + ""))
                        {
                            curRecord["DescFlexField_PrivateDescSeg2"] = string.Empty;//调价原因
                        }
                        if (!string.IsNullOrEmpty(curRecord["DescFlexField_PrivateDescSeg6"] + ""))
                        {
                            curRecord["DescFlexField_PrivateDescSeg6"] = "false";//是否佣金
                        }
                        if (!string.IsNullOrEmpty(curRecord["DescFlexField_PrivateDescSeg20"] + ""))
                        {
                            curRecord["DescFlexField_PrivateDescSeg20"] = string.Empty;//已核销数量
                        }
                        if (!string.IsNullOrEmpty(curRecord["DescFlexField_PrivateDescSeg8"] + ""))
                        {
                            curRecord["DescFlexField_PrivateDescSeg8"] = decimal.Zero;; //已出运数量
                        }
                        if (!string.IsNullOrEmpty(curRecord["DescFlexField_PrivateDescSeg16"] + ""))
                        {
                            curRecord["DescFlexField_PrivateDescSeg16"] = decimal.Zero;//实际出运数量
                        }
                    }
                }
            }
            #endregion
        }