private void SaveRender(object sender, EventArgs e) { OrderHead orderHead = (OrderHead)sender; TextBox tbExtOrderNo = (TextBox)this.FV_Order.FindControl("tbExtOrderNo"); TextBox tbRefOrderNo = (TextBox)this.FV_Order.FindControl("tbRefOrderNo"); TextBox tbMemo = (TextBox)this.FV_Order.FindControl("tbMemo"); TextBox tbWinTime = (TextBox)this.FV_Order.FindControl("tbWinTime"); TextBox tbStartTime = (TextBox)this.FV_Order.FindControl("tbStartTime"); if (tbExtOrderNo != null && tbExtOrderNo.Text.Trim() != string.Empty) { orderHead.ExternalOrderNo = tbExtOrderNo.Text.Trim(); } if (tbRefOrderNo != null && tbRefOrderNo.Text.Trim() != string.Empty) { orderHead.ReferenceOrderNo = tbRefOrderNo.Text.Trim(); } if (tbMemo != null && tbMemo.Text.Trim() != string.Empty) { orderHead.Memo = tbMemo.Text.Trim(); } if (tbWinTime != null && tbWinTime.Text.Trim() != string.Empty) { orderHead.WindowTime = DateTime.Parse(tbWinTime.Text.Trim()); } if (tbStartTime != null && tbStartTime.Text.Trim() != string.Empty) { orderHead.StartTime = DateTime.Parse(tbStartTime.Text.Trim()); } try { TheOrderMgr.UpdateOrder(orderHead, this.CurrentUser, true); this.FV_Order.DataBind(); UpdateView(); ShowSuccessMessage("MasterData.Order.OrderHead.Update.Successfully", this.OrderNo); } catch (BusinessErrorException ex) { this.ShowErrorMessage(ex); } }