void mDataGridNvl_CurrentRowChanged(object sender, EventArgs e) { if (this.mDataGridNvl.CurrentRow == null) { return; } Model.Info_project_Cost info = mDataGridNvl.GetCurrentEntity() as Model.Info_project_Cost; this.DoSelectValueEvent(info); }
private void UcProjectCostList1_SelectValueChange(object sender, object obj) { if (this.ucProjectCostList1.CurrentSelectValue == null) { return; } Model.Info_project_Cost info = this.ucProjectCostList1.CurrentSelectValue as Model.Info_project_Cost; ucProjectCostInfo1.SetDataSource(info); }
private void UcLinkBillList1_SelectValueChange(object sender, object obj) { if (this.ucLinkBillList1.CurrentSelectValue == null) { return; } Model.Info_link_bill info = this.ucLinkBillList1.CurrentSelectValue as Model.Info_link_bill; currentLinkBill = info; Model.Info_project_Cost infoProject = Miles.Coro.Common.Utils.CopyToOther <Model.Info_link_bill, Model.Info_project_Cost>(info); ucProjectCostInfo1.SetDataSource(infoProject); }
private void UcProjectCostList1_SelectValueChange(object sender, object obj) { if (this.ucProjectCostList1.CurrentSelectValue == null) { return; } Model.Info_project_Cost info = this.ucProjectCostList1.CurrentSelectValue as Model.Info_project_Cost; ucProjectCostInfo1.SetDataSource(info); currentLinkBill = linkBillManager.FindLinkBillInfo(info.LinkBill_Id); }
private void Commit(ToolStripButton sender) { if (ucProjectCostInfo1.CurrentSelectValue == null) { return; } Model.Info_project_Cost info = this.ucProjectCostInfo1.CurrentSelectValue as Model.Info_project_Cost; if (manager.CommitProjectCost(info)) { LazyInit(); this.SetButtonClickResultTip(sender, "提交成功"); tabControl1.SelectedIndex = 1; } }
protected override void Save(ToolStripButton sender) { if (ucProjectCostInfo1.CurrentSelectValue == null) { return; } if (this.ucProjectCostInfo1.Save(sender)) { Model.Info_project_Cost info_OrderMain = this.ucProjectCostInfo1.CurrentSelectValue as Model.Info_project_Cost; LazyInit(); this.SetButtonClickResultTip(sender, "保存成功"); tabControl1.SelectedIndex = 1; } }
public override void SetDataSource(object dataSource) { Clear(); base.SetDataSource(dataSource); base.selectValue = dataSource; if (dataSource == null) { return; } Model.Info_project_Cost info = dataSource as Model.Info_project_Cost; this.SetDataBind(dataSource); //商品列表添加 mDataGrid1.SetDataSource <Model.Info_project_Cost_Item>(info.Items); }
protected override void Save(ToolStripButton sender) { if (this.ucProjectCostList1.CurrentSelectValue == null) { return; } Model.Info_project_Cost info = this.ucProjectCostList1.CurrentSelectValue as Model.Info_project_Cost; string msg = string.Format("确定修改:{0},{1}工程费用?", info.Odr_No, info.Odr_Prt_Name); if (Miles.Framework.UI.Function.Dialog.ShowQuestionYesNo(msg)) { if (this.ucProjectCostInfo1.AdminEdit(sender)) { Model.Info_project_Cost info_OrderMain = this.ucProjectCostInfo1.CurrentSelectValue as Model.Info_project_Cost; this.SetButtonClickResultTip(sender, "保存成功"); } } }
/// <summary> /// 管理员修改提交后的费用 /// </summary> /// <param name="sender"></param> /// <returns></returns> public bool AdminEdit(ToolStripButton sender) { if (mDataGrid1.DataSource == null || mDataGrid1.GetDataSource <Model.Info_project_Cost_Item>().Count < 1) { Miles.Framework.UI.Function.MForm.SetToolTip(this.mDataGrid1, "费用列表不能为空", 1000); return(false); } //Model.Info_project_Cost info = this.GetDataBind<Model.Info_project_Cost>(); Model.Info_project_Cost updateNew = this.selectValue as Model.Info_project_Cost; updateNew.Items = mDataGrid1.GetDataSource <Model.Info_project_Cost_Item>(); if (manager.CorrectCost(updateNew)) { DoSelectValueEvent(updateNew); return(true); } else { return(false); } }
/// <summary> /// 工程人员使用 /// </summary> /// <param name="sender"></param> /// <returns></returns> 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_project_Cost_Item>().Count < 1) { Miles.Framework.UI.Function.MForm.SetToolTip(this.mDataGrid1, "费用列表不能为空", 1000); return(false); } //Model.Info_project_Cost info = this.GetDataBind<Model.Info_project_Cost>(); Model.Info_project_Cost updateNew = this.selectValue as Model.Info_project_Cost; updateNew.Items = mDataGrid1.GetDataSource <Model.Info_project_Cost_Item>(); if (manager.Save(updateNew)) { DoSelectValueEvent(updateNew); return(true); } else { return(false); } }
public void UpdateCurrentValue(Model.Info_project_Cost info) { this.mDataGridNvl.EditCurrentItem <Model.Info_project_Cost>(info); }