Пример #1
0
 //整单包材取消确认
 private void BtnSubItemCancel_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
 {
     if (this.part.Model.Views["SO"].FocusedRecord != null && this.part.Model.Views["SO"].FocusedRecord["ID"] != null)
     {
         PubHelperUI.SOUIHelperExtend.ConfirmSubItem(long.Parse(part.Model.Views["SO"].FocusedRecord["ID"].ToString()), false);
     }
 }
Пример #2
0
 //整单BOM生成
 public void BtnSOBom_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
 {
     this.part.Model.ClearErrorMessage();
     try
     {
         List <long> solineList = new List <long>();
         foreach (IUIRecord record in part.Model.Views["SO_SOLines"].Records)
         {
             if (record.DataRecordState == DataRowState.Added)
             {
                 this.part.Model.ErrorMessage.Message = "第" + record["DocLineNo"].ToString() + "行:还未保存!";
                 return;
             }
             solineList.Add(Convert.ToInt64(record["ID"]));
         }
         if (solineList.Count > 0)
         {
             SOUIHelperExtend.CreateSOBom(solineList);
             (this.part.Action as BaseAction).NavigateAction.Refresh(null);
         }
     }
     catch (Exception ex)
     {
         this.part.Model.ErrorMessage.Message = ex.Message;
         return;
     }
 }
Пример #3
0
        //一键创建订单折扣及佣金
        private void BtnCreateBroAndDis_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
        {
            //this.part.Model.ClearErrorMessage();

            part.DataCollect();
            part.IsDataBinding = true;
            part.IsConsuming   = false;

            long headID = this.part.Model.Views["SO"].FocusedRecord.PrimaryKey;

            // 判断当前页面的销售订信息不为空
            if (!IsSO_Null())
            {
                try
                {
                    //IsSO_Null();//判断当前页面的销售订信息不为空

                    int soStatus = Convert.ToInt32(this.part.Model.Views["SO"].FocusedRecord["Status"] + "");
                    //保存后,审核前
                    if (soStatus < 2)
                    {
                        //SOUIHelperExtend.CalcDiscount(long.Parse(part.Model.Views["SO"].FocusedRecord["ID"].ToString()));
                        SOUIHelperExtend.CalcDiscount(headID);

                        List <long> solineList = new List <long>();
                        foreach (IUIRecord record in part.Model.Views["SO_SOLines"].Records)
                        {
                            if (record.DataRecordState == DataRowState.Added)
                            {
                                this.part.Model.ErrorMessage.Message = "第" + record["DocLineNo"].ToString() + "行:还未保存!";
                                return;
                            }
                            solineList.Add(Convert.ToInt64(record["ID"]));
                        }
                        if (solineList.Count > 0)
                        {
                            SOUIHelperExtend.DeleteBrokerage(solineList);
                            SOUIHelperExtend.CreateBrokerage(solineList);
                        }

                        (this.part.Action as BaseAction).NavigateAction.Refresh(null);
                    }
                    else
                    {
                        //this.part.Model.ErrorMessage.Message = "销售订单已审核,不允许再生成折扣和佣金!";
                        this.part.Model.ErrorMessage.Message = "销售订单,开立状态才允许再生成折扣!";
                        return;
                    }
                }
                catch (Exception ex)
                {
                    this.part.Model.ErrorMessage.Message = ex.Message;
                    return;
                }
            }
        }
Пример #4
0
 //订单折扣
 public void BtnDiscountDetail_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
 {
     if (this.part.Model.Views["SO"].FocusedRecord != null)
     {
         NameValueCollection param = new NameValueCollection();
         param.Add("PDPageStatus", "Browse");//这行代码是控制弹开画面为浏览状态
         param.Add("SO", this.part.Model.Views["SO"].FocusedRecord["ID"].ToString());
         part.ShowModalDialog("7913c4b1-fead-41dd-9f86-6924ee29158c", "订单折扣", "730", "375", "", param, true);
     }
 }
Пример #5
0
 //订单费用明细
 public void BtnFeeAmount_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
 {
     if (this.part.Model.Views["SO"].FocusedRecord != null)
     {
         NameValueCollection param = new NameValueCollection();
         param.Add("PDPageStatus", "Browse");//这行代码是控制弹开画面为浏览状态
         param.Add("SO", this.part.Model.Views["SO"].FocusedRecord["ID"].ToString());
         part.ShowModalDialog("4a9eee74-8083-474f-94bb-d7d3ea26a397", "订单费用明细", "630", "375", "", param, true);
     }
 }
Пример #6
0
        //随单BOM
        public void BtnOrderBom_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
        {
            if (this.part.Model.Views["SO"].FocusedRecord != null && this.part.Model.Views["SO_SOLines"].FocusedRecord != null)
            {
                part.Model.ClearErrorMessage();
                part.DataCollect();
                part.IsConsuming   = false;
                part.IsDataBinding = true;

                SetDto();
                part.CurrentState["IsBefore"] = "True";
                part.ShowModalDialog("1291fa14-0137-4dca-958d-ed67066447dc", "订单BOM", "930", "435", "", null, true);
            }
            else
            {
                this.part.Model.ErrorMessage.Message = "当前销售订单/销售订单行不能为空!";
                return;
            }
        }
Пример #7
0
        //订单佣金明细
        public void BtnOrderBrokerage_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
        {
            if (this.part.Model.Views["SO"].FocusedRecord != null && this.part.Model.Views["SO_SOLines"].FocusedRecord != null)
            {
                part.Model.ClearErrorMessage();
                part.DataCollect();
                part.IsConsuming   = false;
                part.IsDataBinding = true;

                SetDto();

                part.ShowModalDialog("c995ec02-be18-45fa-a119-1a5b662899e3", "订单佣金", "880", "400", "", null, true);
            }
            else
            {
                this.part.Model.ErrorMessage.Message = "当前销售订单/销售订单行不能为空!";
                return;
            }
        }
Пример #8
0
        //评估类型
        public void BtnAssessType_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
        {
            if (this.part.Model.Views["SO"].FocusedRecord != null && this.part.Model.Views["SO_SOLines"].FocusedRecord != null)
            {
                part.Model.ClearErrorMessage();
                part.DataCollect();
                part.IsConsuming   = false;
                part.IsDataBinding = true;

                SetDto();

                part.ShowModalDialog("dcf09bda-7aa2-4540-af21-5f950349660b", "评估类型", "630", "375", "", null, true);
            }
            else
            {
                this.part.Model.ErrorMessage.Message = "当前销售订单/销售订单行不能为空!";
                return;
            }
        }
Пример #9
0
        //生成订单折扣
        public void BtnDiscount_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
        {
            this.part.Model.ClearErrorMessage();

            // 判断当前页面的销售订信息不为空
            if (!IsSO_Null())
            {
                try
                {
                    //IsSO_Null();//判断当前页面的销售订信息不为空

                    int soStatus = Convert.ToInt32(this.part.Model.Views["SO"].FocusedRecord["Status"] + "");
                    //保存后,审核前
                    if (soStatus < 2)
                    {
                        try
                        {
                            SOUIHelperExtend.CalcDiscount(long.Parse(part.Model.Views["SO"].FocusedRecord["ID"].ToString()));
                            (this.part.Action as BaseAction).NavigateAction.Refresh(null);
                        }
                        catch (Exception ex)
                        {
                            this.part.Model.ErrorMessage.Message = ex.Message;
                            return;
                        }
                    }
                    else
                    {
                        //this.part.Model.ErrorMessage.Message = "销售订单已审核,不允许再生成折扣和佣金!";
                        this.part.Model.ErrorMessage.Message = "销售订单,开立状态才允许再生成折扣!";
                        return;
                    }
                }
                catch (Exception ex)
                {
                    this.part.Model.ErrorMessage.Message = ex.Message;
                    return;
                }
            }
        }
Пример #10
0
 //预测订单
 public void BtnForecast_ItemClick(object sender, UFSoft.UBF.UI.WebControls.MenuItemClickEventArgs e)
 {
     part.NavigatePage("Cust.GS.FT.CostForecastListURI", null);
 }