private void UcIncomeList1_SelectValueChange(object sender, object obj)
        {
            Model.Info_fin_order_income info = this.ucIncomeList1.CurrentSelectValue as Model.Info_fin_order_income;
            if (obj == null)
            {
                return;
            }
            this.SetDataBind(info);

            //显示合同摘要信息
            Model.Info_fin_order_gen infoGen = genManager.FindTheVaildGen(info.Odr_No);

            if (infoGen.BuildItems.Count == 0)
            {
                infoGen.BuildItems = genManager.GetBuildItems(info.Odr_No);
            }

            if (infoGen.FreightItems.Count == 0)
            {
                infoGen.FreightItems = genManager.GetFreightItems(info.Odr_No);
            }

            //orderGenManagerReport.GridControl = this.reoGridControl1;
            orderGenManagerReport.Show(infoGen, this.reoGridControl1);
        }
示例#2
0
        private void Commit(ToolStripButton sender)
        {
            if (this.ucGenInfo1.CurrentSelectValue == null)
            {
                return;
            }

            Model.Info_fin_order_gen infoGen = this.ucGenInfo1.CurrentSelectValue as Model.Info_fin_order_gen;

            string msg = string.Format("确定提交:{0},{1}?", infoGen.Odr_No, infoGen.Jia_Name);

            if (!Miles.Framework.UI.Function.Dialog.ShowQuestionYesNo(msg))
            {
                return;
            }

            if (manager.Commit(infoGen))
            {
                LoadSelfOrder();
                this.SetButtonClickResultTip(sender, "提交成功");
            }
            else
            {
                this.SetButtonClickResultTip(sender, "提交失败");
            }
        }
示例#3
0
        private void UcGenList1_SelectValueChange(object sender, object obj)
        {
            if (this.ucGenList1.CurrentSelectValue == null)
            {
                return;
            }

            Model.Info_fin_order_gen info = this.ucGenList1.CurrentSelectValue as Model.Info_fin_order_gen;

            if (info.Items.Count == 0)
            {
                info.Items = manager.GetGenItems(info.Odr_No);
            }

            if (info.BuildItems.Count == 0)
            {
                info.BuildItems = manager.GetBuildItems(info.Odr_No);
            }

            if (info.FreightItems.Count == 0)
            {
                info.FreightItems = manager.GetFreightItems(info.Odr_No);
            }

            ucGenInfo1.SetDataSource(info);
        }
示例#4
0
        void mDataGridNvl_CurrentRowChanged(object sender, EventArgs e)
        {
            if (this.mDataGridNvl.CurrentRow == null)
            {
                return;
            }

            Model.Info_fin_order_gen info = mDataGridNvl.GetCurrentEntity() as Model.Info_fin_order_gen;
            this.DoSelectValueEvent(info);
        }
示例#5
0
 protected override void Save(ToolStripButton sender)
 {
     if (this.ucGenInfo1.Save(sender))
     {
         Model.Info_fin_order_gen info_OrderMain = this.ucGenInfo1.CurrentSelectValue as Model.Info_fin_order_gen;
         //ucOrderList1.UpdateCurrentValue(info_OrderMain);
         ucGenList1.UpdateCurrentValue(info_OrderMain);
         LoadSelfOrder();
         this.SetButtonClickResultTip(sender, "保存成功");
     }
 }
        public override void LoadDataSource(Worksheet sheet, object dataSource)
        {
            Model.Info_fin_order_gen info = dataSource as Model.Info_fin_order_gen;
            //替换静态变量
            ReplaceVar(info);

            InsertItems(info.Items, tmpXlsItem);

            //插入动态数据
            //InsertTable(info.Items, GetItemMapArray);
        }
示例#7
0
        private List <Info_fin_order_gen> FindGenList(string odr_No)
        {
            Model.Info_fin_order_gen  infoGen = genManager.FindTheVaildGen(odr_No);
            List <Info_fin_order_gen> list    = new List <Info_fin_order_gen>();

            if (infoGen != null)
            {
                list.Add(infoGen);
            }
            return(list);
        }
示例#8
0
        private void Document(ToolStripButton sender)
        {
            if (this.ucGenList1.CurrentSelectValue == null)
            {
                return;
            }

            Model.Info_fin_order_gen info = ucGenList1.CurrentSelectValue as Model.Info_fin_order_gen;

            Win.FmReoGridShow fmReoGridShow = new Win.FmReoGridShow();
            fmReoGridShow.SetReportBind(new Report.FmOrderGenManagerReport(), info);
            fmReoGridShow.ShowDialog();
        }
示例#9
0
        protected override bool BtnOkClick()
        {
            if (mDataGrid1.CurrentRow == null)
            {
                return(false);
            }

            Model.Info_fin_order_gen info = mDataGrid1.GetCurrentEntity() as Model.Info_fin_order_gen;

            this.DoSelectValueEvent(info);

            return(true);
        }
        private void UcIncomeList1_SelectValueChange(object sender, object obj)
        {
            Model.Info_fin_order_outcome info = this.ucOutcomeList1.CurrentSelectValue as Model.Info_fin_order_outcome;
            if (obj == null)
            {
                return;
            }
            this.SetDataBind(info);

            //显示合同摘要信息
            Model.Info_fin_order_gen infoGen = genManager.FindTheVaildGen(info.Odr_No);

            //orderGenManagerReport.GridControl = this.reoGridControl1;
            orderGenManagerReport.Show(infoGen, this.reoGridControl1);
        }
示例#11
0
        private void Document(ToolStripButton sender)
        {
            if (this.mDataGrid1.CurrentRow == null)
            {
                return;
            }

            Model.Info_fin_order_gen info = mDataGrid1.GetCurrentEntity() as Model.Info_fin_order_gen;
            if (info.Items.Count == 0)
            {
                info.Items = manager.GetGenItems(info.Odr_No);
            }
            Win.FmReoGridShow fmReoGridShow = new Win.FmReoGridShow();
            fmReoGridShow.SetReportBind(new Report.FmOrderGenManagerReport(), info);
            fmReoGridShow.ShowDialog();
        }
示例#12
0
        private void DocumentAdd(ToolStripButton sender)
        {
            FmGenSelect fmOrderNo = new FmGenSelect();

            fmOrderNo.SelectValue += (obj) =>
            {
                Model.Info_fin_order_gen    infoGen    = obj as Model.Info_fin_order_gen;
                Model.Info_fin_order_income infoIncome = Miles.Coro.Common.Utils.CopyToOther <Model.Info_fin_order_gen, Model.Info_fin_order_income>(infoGen);

                if (this.manager.Save(infoIncome))
                {
                    LoadSelfOrder();
                }
            };

            fmOrderNo.ShowDialog();
        }
示例#13
0
        public override void SetDataSource(object dataSource)
        {
            Clear();
            base.SetDataSource(dataSource);
            base.selectValue = dataSource;
            if (dataSource == null)
            {
                return;
            }


            Model.Info_fin_order_gen info = dataSource as Model.Info_fin_order_gen;
            //this.Tag = info.Odr_Id;
            this.SetDataBind(dataSource);

            //商品列表添加
            mDataGrid1.SetDataSource <Model.Info_fin_order_item>(info.Items);
        }
示例#14
0
        public override bool Save(ToolStripButton sender)
        {
            Dictionary <Control, string> dicEmptyCtrs = this.GetValidEmptyCtrs();

            if (dicEmptyCtrs.Count > 0)
            {
                foreach (var ctr in dicEmptyCtrs.Keys)
                {
                    Miles.Framework.UI.Function.MForm.SetToolTip(ctr, dicEmptyCtrs[ctr], 1000);
                    return(false);
                }
            }

            if (mDataGrid1.DataSource == null || mDataGrid1.GetDataSource <Model.Info_fin_order_item>().Count < 1)
            {
                Miles.Framework.UI.Function.MForm.SetToolTip(this.mDataGrid1, "产品列表不能为空", 1000);
                return(false);
            }

            Model.Info_fin_order_gen info = this.GetDataBind <Model.Info_fin_order_gen>();

            Model.Info_fin_order_gen updateNew = this.selectValue as Model.Info_fin_order_gen;

            updateNew.Deliver_Date = info.Deliver_Date;
            //updateNew.Freight_Cost = info.Freight_Cost;
            updateNew.Gen_Date      = DateTime.Now;
            updateNew.Odr_Cost      = info.Odr_Cost;
            updateNew.Part_Cost     = info.Part_Cost;
            updateNew.Remark        = info.Remark;
            updateNew.Sales_Cost    = info.Sales_Cost;
            updateNew.Supplier_Info = info.Supplier_Info;
            updateNew.Tax_Cost      = info.Tax_Cost;
            updateNew.Discount_Cost = info.Discount_Cost;
            updateNew.Rent_Cost     = info.Rent_Cost;

            updateNew.Items = mDataGrid1.GetDataSource <Model.Info_fin_order_item>();

            return(manager.SaveGenAll(updateNew));
        }
示例#15
0
 public void UpdateCurrentValue(Model.Info_fin_order_gen info)
 {
     this.mDataGridNvl.EditCurrentItem <Model.Info_fin_order_gen>(info);
 }