private void UcCarriageList1_SelectValueChange(object sender, object obj) { if (ucCarriageList1.CurrentSelectValue == null) { return; } Model.Info_carriage_bill info = ucCarriageList1.CurrentSelectValue as Model.Info_carriage_bill; ucCarriageInfo1.SetDataSource(info); }
void mDataGridNvl_CurrentRowChanged(object sender, EventArgs e) { if (this.mDataGridNvl.CurrentRow == null) { return; } Model.Info_carriage_bill info = mDataGridNvl.GetCurrentEntity() as Model.Info_carriage_bill; this.DoSelectValueEvent(info); }
public override void SetDataSource(object dataSource) { Clear(); base.SetDataSource(dataSource); base.selectValue = dataSource; if (dataSource == null) { return; } Model.Info_carriage_bill info = dataSource as Model.Info_carriage_bill; this.Tag = info.Carriage_Id; this.SetDataBind(dataSource); }
private void Document(ToolStripButton sender) { if (this.mDataGrid1.CurrentRow == null) { return; } Model.Info_carriage_bill info = mDataGrid1.GetCurrentEntity() as Model.Info_carriage_bill; Win.FmReoGridShow fmReoGridShow = new Win.FmReoGridShow(); fmReoGridShow.SetReportBind(new Report.FmCarriageManagerReport(), info); fmReoGridShow.ShowDialog(); }
private void Document(ToolStripButton sender) { if (tabControl1.SelectedIndex != 1) { return; } if (this.ucCarriageInfo1.CurrentSelectValue == null) { return; } Model.Info_carriage_bill info = ucCarriageInfo1.CurrentSelectValue as Model.Info_carriage_bill; Win.FmReoGridShow fmReoGridShow = new Win.FmReoGridShow(); fmReoGridShow.SetReportBind(new Report.FmCarriageManagerReport(), info); fmReoGridShow.ShowDialog(); }
private void Commit(ToolStripButton sender) { if (tabControl1.SelectedIndex != 1) { return; } if (ucCarriageInfo1.CurrentSelectValue == null) { return; } Model.Info_carriage_bill info = ucCarriageInfo1.CurrentSelectValue as Model.Info_carriage_bill; if (manager.Commit(info)) { LoadNoDoneCarriage(); this.SetButtonClickResultTip(sender, "提交成功"); } }
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.Info_carriage_bill info = this.GetDataBind <Model.Info_carriage_bill>(); Model.Info_link_bill bill = this.modelObj as Model.Info_link_bill; //如果是销售或者租赁项目,项目必须选中 int carType = int.Parse(cmbCarriageType1.SelectKey.ToString()); if (carType != 5) { if (bill == null) { Miles.Framework.UI.Function.MForm.SetToolTip(mTextInput1, "类型是项目的运输单必须根据项目建立", 1000); return(false); } info = Miles.Coro.Common.Utils.CopyToOther <Model.Info_link_bill, Model.Info_carriage_bill>(bill, info); } if (!manager.Add(info)) { return(false); } this.DoSelectValueEvent(info); return(true); }
private void DocumentRemove(ToolStripButton sender) { if (tabControl1.SelectedIndex != 1) { return; } if (ucCarriageList1.CurrentSelectValue == null) { return; } Model.Info_carriage_bill info = ucCarriageList1.CurrentSelectValue as Model.Info_carriage_bill; string msg = string.Format("确定删除:{0},{1}运输单?", info.Odr_No, info.Carriage_Name); if (Miles.Framework.UI.Function.Dialog.ShowQuestionYesNo(msg)) { if (manager.Remove(info)) { LazyInit(); this.SetButtonClickResultTip(sender, "删除成功"); } } }
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); } } Model.Info_carriage_bill info = dataSource as Model.Info_carriage_bill; Model.Info_carriage_bill update = this.GetDataBind <Model.Info_carriage_bill>(info); if (manager.Save(update)) { base.SetDataSource(update); base.selectValue = update; } return(true); }
public void UpdateCurrentValue(Model.Info_carriage_bill info) { this.mDataGridNvl.EditCurrentItem <Model.Info_carriage_bill>(info); }
public override void LoadDataSource(Worksheet sheet, object dataSource) { Model.Info_carriage_bill info = dataSource as Model.Info_carriage_bill; ReplaceVar(info, false); }