private void LoadData() { var receiveHeader = ReceiveService.GetReceiving(RowID); hypLookUpPO.Attributes["onclick"] = String.Format("showPromptPopUp('PromptPurchaseOrder.aspx?Code=cphMainContent_hidPOID&Name=ctl00_cphMainContent_txtDocumentPO&BranchID={0}', null, 550, 900);", receiveHeader.PurchaseOrderHeader.BranchID); ddlWarehouse.Items.Clear(); ddlWarehouse.DataSource = WarehouseService.GetWarehouses(Convert.ToInt32(ddlFindBranch.SelectedValue)); ddlWarehouse.DataTextField = "Name"; ddlWarehouse.DataValueField = "ID"; ddlWarehouse.DataBind(); lblBranch.Text = receiveHeader.PurchaseOrderHeader.Branch.Name; Detail = ReceiveService.GetreceiveDetail(RowID).ToList(); receivingDate.SelectedDate = receiveHeader.Date; txtDocumentNo.Text = receiveHeader.DocumentNo; txtDocumentNo.ReadOnly = true; txtDocumentPO.Text = receiveHeader.PurchaseOrderHeader.DocumentNo; hidPOID.Value = Convert.ToString(receiveHeader.PurchaseOrderHeader.ID); //ddlPurchaseOrder.SelectedValue = Convert.ToString(receiveHeader.PurchaseOrderID); txtDocumentPO.ReadOnly = true; txtGoodIssueNo.Text = receiveHeader.GoodIssueNo; txtFreightInfo.Text = receiveHeader.FreightInfo; txtNotes.Text = receiveHeader.Notes; ddlWarehouse.SelectedValue = Convert.ToString(receiveHeader.WarehouseID); btnVoid.Enabled = true; btnPrint.Enabled = true; RefreshDetail(); if (receiveHeader.VoidDate.HasValue) { btnSave.Enabled = false; btnPrint.Enabled = false; btnVoid.Enabled = false; } }
private void LoadData() { var receiveHeader = ReceiveService.GetReceiving(RowID); Detail = ReceiveService.GetreceiveDetail(RowID).ToList(); receivingDate.SelectedDate = receiveHeader.Date; txtDocumentNo.Text = receiveHeader.DocumentNo; txtDocumentPO.Text = receiveHeader.PurchaseOrderHeader.DocumentNo; hidPOID.Value = Convert.ToString(receiveHeader.PurchaseOrderHeader.ID); //ddlPurchaseOrder.SelectedValue = Convert.ToString(receiveHeader.PurchaseOrderID); txtGoodIssueNo.Text = receiveHeader.GoodIssueNo; txtFreightInfo.Text = receiveHeader.FreightInfo; txtNotes.Text = receiveHeader.Notes; btnVoid.Enabled = true; btnPrint.Enabled = true; RefreshDetail(); if (receiveHeader.VoidDate.HasValue) { btnSave.Enabled = false; btnPrint.Enabled = false; btnVoid.Enabled = false; } }