예제 #1
0
        //protected override void OnLoad(EventArgs e)
        //{
        //    base.OnLoad(e);
        //    Clear();
        //}

        private void LoadCtrDs()
        {
            user = Miles.IMSFramework.AppCache.Employee as Miles.IMSFramework.Model.Sm_employee;
            this.d_cmb_odrFixedMode.LoadData();
            this.d_cmb_odrTaxType.LoadData();
            this.d_cmb_odrTransParty.LoadData();
            this.d_cmb_BuildParties.LoadData();
            this.d_cmb_Tmp.LoadData(1);
            this.d_cmb_Tmp.SelectItemEvent +=
                (object item) =>
            {
                d_TmpExplain.Text = null;
                mDataGrid2.Clear();

                if (item == null)
                {
                    return;
                }

                Model.Tb_tmp_info obj = item as Model.Tb_tmp_info;
                d_TmpExplain.Text = obj.Tmp_Explain;
                //加载模板动态变量
                List <Model.Info_tmp_map> vars = tmpManager.GetTmpDynamicVars(obj.Tmp_Id);
                mDataGrid2.SetDataSource <Model.Info_tmp_map>(vars);

                ucOrderProtocol1.SynStreamBody();
            };
        }
예제 #2
0
        public override bool Save(ToolStripButton sender)
        {
            Model.Tb_tmp_info obj = d_cmb_Tmp.SelectedItem as Model.Tb_tmp_info;
            if (obj == null)
            {
                Miles.Framework.UI.Function.MForm.SetToolTip(this.d_cmb_Tmp, "请选择合同模板", 1000);
                return(false);
            }

            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);
                }
            }


            Model.Info_OrderMain info = this.GetDataBind <Model.Info_OrderMain>();
            info.Tmp_Id = obj.Tmp_Id;
            //info.Odr_No = this.Tag as string;
            info.Odr_Type  = obj.Order_Type;
            info.Oper_Code = user.Employ_Code;

            mDataGrid2.EndEdit();
            Dictionary <string, string> fieldExtend = new Dictionary <string, string>();

            foreach (Model.Info_tmp_map map in mDataGrid2.GetDataSource <Model.Info_tmp_map>())
            {
                if (string.IsNullOrEmpty(map.Var_Value))
                {
                    MessageBox.Show(string.Format("参数值:{0}不能为空", map.Var_Explain));
                    return(false);
                }
                fieldExtend.Add(map.Var_Text, map.Var_Value);
            }
            info.FieldExtend = fieldExtend;


            if (ucOrderProtocol1.StreamBody == null || ucOrderProtocol1.StreamBody.Length < 1)
            {
                Miles.Framework.UI.Function.MForm.SetToolTip(this.ucOrderProtocol1, "文本不能为空", 1000);
                return(false);
            }

            info.Odr_Clause = ucOrderProtocol1.StreamBody.ToArray();

            info.Odr_No_Main = info.Odr_No;
            bool blFlag = orderManager.SaveOrderAllInfo(info, blUpdate);

            if (blFlag)
            {
                this.DoSelectValueEvent(info);
            }

            return(blFlag);
        }
예제 #3
0
        protected override bool BtnOkClick()
        {
            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);
                }
            }


            Model.Tb_tmp_info infoBind = this.GetDataBind <Model.Tb_tmp_info>();

            Model.Tb_tmp_info info = modelObj as Model.Tb_tmp_info;
            info.Item_Table_Seq  = infoBind.Item_Table_Seq;
            info.Item_Clause_Seq = infoBind.Item_Clause_Seq;
            info.Item_Pay_Seq    = infoBind.Item_Pay_Seq;

            if (!manager.UpdateTmpOtherInfo(info))
            {
                return(false);
            }

            this.DoSelectValueEvent(info);

            return(true);
        }
예제 #4
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (!this.blNewFlag)
     {
         Model.Tb_tmp_info info = modelObj as Model.Tb_tmp_info;
         SetAccountInfo(info);
     }
 }
예제 #5
0
        protected override void LazyInit()
        {
            LoadCtrDs();
            this.d_totCost.TextChanged            += D_totCost_TextChanged;
            this.ucOrderProtocol1.GetTmpStreamBody = () =>
            {
                Model.Tb_tmp_info info = d_cmb_Tmp.SelectedItem as Model.Tb_tmp_info;
                if (info == null)
                {
                    Miles.Framework.UI.Function.MForm.SetToolTip(this.d_cmb_Tmp, "请选择合同模板", 1000);
                    return(null);
                }
                byte[] btsClause = tmpManager.GetTmpClause(info.Tmp_Id);

                return(new MemoryStream(btsClause));
            };
        }
예제 #6
0
        //protected override void OnLoad(EventArgs e)
        //{
        //    base.OnLoad(e);
        //    Clear();
        //}

        private void LoadCtrDs()
        {
            user = Miles.IMSFramework.AppCache.Employee as Miles.IMSFramework.Model.Sm_employee;
            this.d_cmb_odrFixedMode.LoadData();
            this.d_cmb_odrTaxType.LoadData();
            this.d_cmb_odrTransParty.LoadData();
            this.d_cmb_odr_Ground_State.LoadData();
            this.d_cmb_Tmp.LoadData(2);
            this.d_cmb_Tmp.SelectItemEvent +=
                (object item) =>
            {
                d_TmpExplain.Text = null;
                mDataGrid2.Clear();

                if (item == null)
                {
                    return;
                }

                Model.Tb_tmp_info obj = item as Model.Tb_tmp_info;
                d_TmpExplain.Text = obj.Tmp_Explain;
                //加载模板动态变量
                List <Model.Info_tmp_map> vars = tmpManager.GetTmpDynamicVars(obj.Tmp_Id);
                mDataGrid2.SetDataSource <Model.Info_tmp_map>(vars);

                d_letBudEDate.IsValid  = obj.Order_Type == 2 ? true : false;
                d_letBudSDate.IsValid  = obj.Order_Type == 2 ? true : false;
                d_letEntryDate.IsValid = obj.Order_Type == 2 ? true : false;
                d_letRmEDate.IsValid   = obj.Order_Type == 2 ? true : false;
                d_letRmSDate.IsValid   = obj.Order_Type == 2 ? true : false;
                d_letUseEDate.IsValid  = obj.Order_Type == 2 ? true : false;
                d_letUseSDate.IsValid  = obj.Order_Type == 2 ? true : false;
                d_odrBudPalce.IsValid  = obj.Order_Type == 2 ? true : false;

                ucOrderProtocol1.SynStreamBody();
            };
        }
예제 #7
0
 private void SetAccountInfo(Model.Tb_tmp_info info)
 {
     this.SetDataBind(info);
 }
예제 #8
0
 public FmTmpOtherInfo(Model.Tb_tmp_info info)
     : base(info)
 {
     InitializeComponent();
 }