Exemple #1
0
 private void Confirm_Click(object sender, EventArgs e)
 {
     Order order;
     if (this.Tag == null)
     {
         order = new Order();
         order.Status = ((AppDic)this.Status.SelectedItem).Key;
     }
     else {
         order = (Order)this.Tag;
     }
     order.BeginDate = this.BeginDate.Value.ToString(Constants.DateFormat);
     order.OrderNo = this.OrderNo.Text.Trim();
     order.Description = this.Description.Text.Trim();
     order.Remark = this.Remark.Text.Trim();
     order.SalesMan = ((AppDic)this.SalesMan.SelectedItem).Key;
     if (string.IsNullOrEmpty(order.OrderNo))
     {
         return;
     }
     if (string.IsNullOrEmpty(order.Description))
     {
         return;
     }
     finOrderManager.InsertOrUpdateOrder(order);
     this.Close();
 }
Exemple #2
0
 private void LoadUpdateOrder(Order order)
 {
     if (order == null) return;
     this.Tag = order;
     this.BeginDate.Text = order.BeginDate;
     this.OrderNo.Text = order.OrderNo;
     this.Description.Text = order.Description;
     this.Remark.Text = order.Remark;
     AliHelperUtils.LoadAppDicComboBoxValue(this.SalesMan, order.SalesMan);
     AliHelperUtils.LoadAppDicComboBoxValue(this.Status, order.Status);
     this.Status.Enabled = false;
 }