public ApplyUseOrderInfoForm(T_ApplyUseOrder applyUseOrder) { InitializeComponent(); base.formmode = frmmodetype.edit; this.ApplyUseOrder = applyUseOrder; this.okButton.Enabled = false; }
public void AddApplyUseOrder(T_ApplyUseOrder applyUseOrder) { applyUseOrder.ApplyUseDate = DateTime.Now.ToString("yyyy-MM-dd"); ApplyUseOrderList.Add(applyUseOrder); }
public void UpdateAddApplyUseOrder(T_ApplyUseOrder applyUseOrder) { ApplyUseOrderList.Remove(ApplyUseOrderList.Find(o => o.ApplyUseNo == applyUseOrder.ApplyUseNo)); ApplyUseOrderList.Add(applyUseOrder); }
protected override void FormLoad() { this.ApplyUseTypeComboBox.DataSource = EnumTool.GetDataSource(typeof(Enums.ApplyUseTypes)); this.ApplyUseTypeComboBox.SelectedIndex = 1; this.UserComboBox.DataSource = proxy.GetEmployees(); this.ApplicantComboBox.DataSource = proxy.GetEmployees(); this.ApplyDeptComboBox.DataSource = proxy.GetAllDepts(); this.gvUnitEdit.DataSource = proxy.GetUnitList(); if (formmode == frmmodetype.add) { ApplyUseOrder = new T_ApplyUseOrder() { ApplyUseNo = proxy.GetLatestApplyUseOrderIndex(), Register = Global.UserNo, RegisterDesc = Global.UserName }; _ApplyUseOrderDetails = new List<T_ApplyUseOrderDetail>(); } else { _ApplyUseOrderDetails = proxy.GetApplyUserOrderDetails(ApplyUseOrder.ApplyUseNo); } SetData(); }
public ApplyUseOrderInfoForm(frmmodetype type, T_ApplyUseOrder applyUseOrder) { InitializeComponent(); base.formmode = type; this.ApplyUseOrder = applyUseOrder; }