public void GetTransferDetails(string TransferID) { long TRID = long.Parse(TransferID); BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient(); BrilliantWMS.WMSInbound.iInboundClient Inbound = new WMSInbound.iInboundClient(); CustomProfile profile = CustomProfile.GetProfile(); iUCCommonFilterClient objService = new iUCCommonFilterClient(); List <vGetUserProfileByUserID> UsersList = new List <vGetUserProfileByUserID>(); try { BrilliantWMS.WMSOutbound.tTransferHead trh = new WMSOutbound.tTransferHead(); //= new tTransferHead(); trh = Outbound.GetTransferHeadDetailByTransferID(TRID, profile.DBConnection._constr); lblWTWTransferNo.Text = trh.ID.ToString(); UCWTWTransferDate.Date = trh.TransferDate; fillUser(); ddlWTWTransferBy.SelectedIndex = ddlWTWTransferBy.Items.IndexOf(ddlWTWTransferBy.Items.FindByValue(trh.TransferBy.ToString())); ddlWTWStatus.DataSource = WMFillStatus(); ddlWTWStatus.DataBind(); ddlWTWStatus.SelectedIndex = ddlWTWStatus.Items.IndexOf(ddlWTWStatus.Items.FindByValue(trh.Status.ToString())); fillWarehouse(); ddlFWarehouse.SelectedIndex = ddlFWarehouse.Items.IndexOf(ddlFWarehouse.Items.FindByValue(trh.FromPosition.ToString())); List <BrilliantWMS.WMSInbound.mWarehouseMaster> ToWarehouseList = new List <WMSInbound.mWarehouseMaster>(); long UserID = profile.Personal.UserID; ToWarehouseList = Inbound.GetUserWarehouse(UserID, profile.DBConnection._constr).ToList(); ddlTWarehouse.DataSource = ToWarehouseList; ddlTWarehouse.DataBind(); ddlTWarehouse.SelectedIndex = ddlTWarehouse.Items.IndexOf(ddlTWarehouse.Items.FindByValue(trh.ToPosition.ToString())); WTWTRemark.Text = trh.Remark.ToString(); txtAirwayBill.Text = trh.AirwayBill.ToString(); txtShippingType.Text = trh.ShippingType.ToString(); UC_ShippingDate.Date = trh.ShippingDate; UCExpDeliveryDate.Date = trh.ExpDeliveryDate; txtTransporterName.Text = trh.TransporterName.ToString(); Grid1.DataSource = Outbound.GetTransferPartDetailByTransferID(TRID, long.Parse(trh.FromPosition.ToString()), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr); Grid1.DataBind(); ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeRequest" + Session.SessionID, "changemode(true, 'divWTWTransferDetail');LoadingOff();", true); } catch { } finally { Outbound.Close(); objService.Close(); UsersList.Clear(); } }