示例#1
0
        public ApplyUseOrderInfoForm(T_ApplyUseOrder applyUseOrder)
        {
            InitializeComponent();
            base.formmode = frmmodetype.edit;
            this.ApplyUseOrder = applyUseOrder;

            this.okButton.Enabled = false;
        }
示例#2
0
 public void AddApplyUseOrder(T_ApplyUseOrder applyUseOrder)
 {
     applyUseOrder.ApplyUseDate = DateTime.Now.ToString("yyyy-MM-dd");
     ApplyUseOrderList.Add(applyUseOrder);
 }
示例#3
0
 public void UpdateAddApplyUseOrder(T_ApplyUseOrder applyUseOrder)
 {
     ApplyUseOrderList.Remove(ApplyUseOrderList.Find(o => o.ApplyUseNo == applyUseOrder.ApplyUseNo));
     ApplyUseOrderList.Add(applyUseOrder);
 }
示例#4
0
        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();
        }
示例#5
0
 public ApplyUseOrderInfoForm(frmmodetype type, T_ApplyUseOrder applyUseOrder)
 {
     InitializeComponent();
     base.formmode = type;
     this.ApplyUseOrder = applyUseOrder;
 }