public void GetASNDetail(long asnID) { iInboundClient Inbound = new iInboundClient(); CustomProfile profile = CustomProfile.GetProfile(); iUCCommonFilterClient objService = new iUCCommonFilterClient(); List <vGetUserProfileByUserID> UsersList = new List <vGetUserProfileByUserID>(); try { tASNHead ah = new tASNHead(); ah = Inbound.GetAsnByAsnID(asnID, profile.DBConnection._constr); txtASNNumber.Text = ah.ASNNumber.ToString(); UCASNDate.Date = ah.ASNDate; UsersList = objService.GetUserListByWarehouseID(10013, profile.DBConnection._constr).ToList(); UsersList = UsersList.Where(x => x.userID == profile.Personal.UserID).ToList(); vGetUserProfileByUserID select = new vGetUserProfileByUserID() { userID = 0, userName = "******" }; UsersList.Insert(0, select); ddlASNBy.DataSource = UsersList; ddlASNBy.DataBind(); ddlASNBy.SelectedIndex = ddlASNBy.Items.IndexOf(ddlASNBy.Items.FindByValue(ah.ASNEnteredBy.ToString())); List <mWarehouseMaster> WarehouseList = new List <mWarehouseMaster>(); long UserID = profile.Personal.UserID; WarehouseList = Inbound.GetUserWarehouse(UserID, profile.DBConnection._constr).ToList(); ddlWarehouse.DataSource = WarehouseList; ddlWarehouse.DataBind(); // ddlWarehouse.SelectedIndex = ddlWarehouse.Items.IndexOf(ddlWarehouse.Items.FindByValue(ah.WarehouseNo.ToString())); List <mVendor> VendorLst = new List <mVendor>(); VendorLst = Inbound.GetVendor(profile.Personal.CompanyID, profile.DBConnection._constr).ToList(); ddlVendor.DataSource = VendorLst; ddlVendor.DataBind(); // ddlVendor.SelectedIndex = ddlVendor.Items.IndexOf(ddlVendor.Items.FindByValue(ah.VendorId.ToString())); txtRemark.Text = ah.Remark.ToString(); Grid1.DataSource = Inbound.GetASNDetailByID(asnID, profile.DBConnection._constr); Grid1.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, "AsnDetail.aspx", "GetASNDetail"); } finally { Inbound.Close(); } }
public void FillObjectList(string SelectedRecords, string ObjectName) { CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.WMSInbound.iInboundClient Inbound = new WMSInbound.iInboundClient(); //iInboundClient Inbound = new iInboundClient(); iUCCommonFilterClient objService = new iUCCommonFilterClient(); List <vGetUserProfileByUserID> UsersList = new List <vGetUserProfileByUserID>(); try { DataSet ds = new DataSet(); ds = Inbound.GetNextObject(SelectedRecords, ObjectName, profile.Personal.CompanyID, profile.DBConnection._constr); ddlObjectName.DataSource = ds; ddlObjectName.DataBind(); long WarehouseID = 0; string[] onePo = SelectedRecords.Split(','); long POID = 0; if (ObjectName == "PurchaseOrder") { POID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSInbound.tPurchaseOrderHead POHead = new WMSInbound.tPurchaseOrderHead(); //tPurchaseOrderHead POHead = new tPurchaseOrderHead(); POHead = Inbound.GetPoHeadByPOID(POID, profile.DBConnection._constr); WarehouseID = long.Parse(POHead.Warehouse.ToString()); } else if (ObjectName == "GRN") { long GRNID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSInbound.WMS_VW_GetGRNDetails GrnLst = new WMSInbound.WMS_VW_GetGRNDetails(); //WMS_VW_GetGRNDetails GrnLst = new WMS_VW_GetGRNDetails(); GrnLst = Inbound.GetGRNDetailsByGRNIDGRNMenu(GRNID, profile.DBConnection._constr); POID = long.Parse(GrnLst.OID.ToString()); BrilliantWMS.WMSInbound.tPurchaseOrderHead POHead = new WMSInbound.tPurchaseOrderHead(); //tPurchaseOrderHead POHead = new tPurchaseOrderHead(); POHead = Inbound.GetPoHeadByPOID(POID, profile.DBConnection._constr); WarehouseID = long.Parse(POHead.Warehouse.ToString()); } else if (ObjectName == "QC") { long QCID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSInbound.WMS_VW_GetQCDetails QClist = new WMSInbound.WMS_VW_GetQCDetails(); //WMS_VW_GetQCDetails QClist = new WMS_VW_GetQCDetails(); QClist = Inbound.GetQCDetailsByQCID(QCID, profile.DBConnection._constr); WarehouseID = long.Parse(QClist.WarehouseID.ToString()); } else if (ObjectName == "SalesOrder") { long SOID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient(); BrilliantWMS.WMSOutbound.tOrderHead soHead = new WMSOutbound.tOrderHead(); //tOrderHead soHead = new tOrderHead(); soHead = Outbound.GetSoHeadBySOID(SOID, profile.DBConnection._constr); WarehouseID = long.Parse(soHead.StoreId.ToString()); } UsersList = objService.GetUserListByWarehouseID(WarehouseID, profile.DBConnection._constr).ToList(); UsersList = UsersList.Where(x => x.userID == profile.Personal.UserID).ToList(); vGetUserProfileByUserID select = new vGetUserProfileByUserID() { userID = 0, userName = "******" }; UsersList.Insert(0, select); ddlAssignTo.DataSource = UsersList; ddlAssignTo.DataBind(); } catch { } finally { Inbound.Close(); } //if (Request.QueryString["invoker"] != null) CurrentObject = Request.QueryString["invoker"].ToString(); //UCAssignTaskService.iUCAssignTaskClient ucAssignTaskService = new UCAssignTaskService.iUCAssignTaskClient(); //ddlObjectName.DataSource = ucAssignTaskService.GetObjectToBind(CurrentObject, profile.DBConnection._constr); //ddlObjectName.DataBind(); //ucAssignTaskService.Close(); }
public void fillUser() { BrilliantWMS.WMSInbound.iInboundClient Inbound = new WMSInbound.iInboundClient(); BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient(); iUCCommonFilterClient objService = new iUCCommonFilterClient(); List <vGetUserProfileByUserID> UsersList = new List <vGetUserProfileByUserID>(); try { CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.WMSOutbound.tOrderHead OH = new WMSOutbound.tOrderHead(); long WarehouseID = 0; if (Session["QCID"] != null) { int chkJObCart = Inbound.CheckJobCard(Convert.ToInt64(HttpContext.Current.Session["QCID"].ToString()), "SalesOrder", profile.DBConnection._constr); if (chkJObCart >= 1) { DataSet dsJCN = new DataSet(); dsJCN = Outbound.CheckSelectedSOJobCardNo(Convert.ToInt64(HttpContext.Current.Session["QCID"].ToString()), "SalesOrder", profile.DBConnection._constr); if (dsJCN != null && dsJCN.Tables[0].Rows.Count > 0) { //lblSelectedPO.Text = dsJCN.Tables[0].Rows[0]["OrderNo"].ToString(); //lblSelectedGTN.Text = dsJCN.Tables[0].Rows[0]["JobCardName"].ToString(); //lblPurchaseOrderDate.Text = dsJCN.Tables[0].Rows[0]["CreationDate"].ToString(); //lblPOBy.Text = dsJCN.Tables[0].Rows[0]["CreatedByUser"].ToString(); WarehouseID = long.Parse(dsJCN.Tables[0].Rows[0]["Warehouse"].ToString()); } } else { OH = Outbound.GetSoDetailByQCID(Convert.ToInt64(HttpContext.Current.Session["QCID"].ToString()), profile.DBConnection._constr); //lblSelectedPO.Text = Session["POID"].ToString(); //lblSelectedGTN.Text = "Not Created"; //lblPurchaseOrderDate.Text = POHead.POdate.Value.ToString("dd-MMM-yyyy"); //lblPOBy.Text = Inbound.GetUserNameByID(long.Parse(POHead.CreatedBy.ToString()), profile.DBConnection._constr); WarehouseID = long.Parse(OH.StoreId.ToString()); } } else if (Session["TRID"] != null) { int chkJObCart = Inbound.CheckJobCard(Convert.ToInt64(HttpContext.Current.Session["TRID"].ToString()), "Transfer", profile.DBConnection._constr); if (chkJObCart >= 1) { DataSet dsJCN = new DataSet(); dsJCN = Outbound.CheckSelectedSOJobCardNo(Convert.ToInt64(HttpContext.Current.Session["TRID"].ToString()), "Transfer", profile.DBConnection._constr); if (dsJCN != null && dsJCN.Tables[0].Rows.Count > 0) { WarehouseID = long.Parse(dsJCN.Tables[0].Rows[0]["Warehouse"].ToString()); } } else { BrilliantWMS.WMSInbound.tTransferHead TRHead = new WMSInbound.tTransferHead(); TRHead = Inbound.GetTransferHeadByTRID(Convert.ToInt64(HttpContext.Current.Session["TRID"].ToString()), profile.DBConnection._constr); WarehouseID = long.Parse(TRHead.FromPosition.ToString()); } } UsersList = objService.GetUserListByWarehouseID(WarehouseID, profile.DBConnection._constr).ToList(); UsersList = UsersList.Where(x => x.userID == profile.Personal.UserID).ToList(); vGetUserProfileByUserID select = new vGetUserProfileByUserID() { userID = 0, userName = "******" }; UsersList.Insert(0, select); ddlDispatchBy.DataSource = UsersList; ddlDispatchBy.DataBind(); } catch { } finally { objService.Close(); } }
public void GetDispatchDetails(string QCID) { long selQCID = 0; BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient(); CustomProfile profile = CustomProfile.GetProfile(); iUCCommonFilterClient objService = new iUCCommonFilterClient(); List <vGetUserProfileByUserID> UsersList = new List <vGetUserProfileByUserID>(); try { if (Session["QCID"] != null) { selQCID = long.Parse(QCID.ToString()); BrilliantWMS.WMSOutbound.WMS_VW_GetDispatchDetails dispatchLst = new WMSOutbound.WMS_VW_GetDispatchDetails(); dispatchLst = Outbound.GetDispatchDetailsByQCID(selQCID, profile.DBConnection._constr); lblDispatchNo.Text = dispatchLst.ID.ToString(); UCDispatchDate.Date = dispatchLst.DispatchDate; txtRemark.Text = dispatchLst.Remark.ToString(); txtAirwayBill.Text = dispatchLst.AirwayBill.ToString(); txtShippingType.Text = dispatchLst.ShippingType.ToString(); UC_ShippingDate.Date = dispatchLst.ShippingDate; UCExpDeliveryDate.Date = dispatchLst.ExpDeliveryDate; txtTransporterName.Text = dispatchLst.TransporterName.ToString(); txtTransporterRemark.Text = dispatchLst.TransporterRemark.ToString(); long WarehouseID = long.Parse(dispatchLst.StoreId.ToString()); UsersList = objService.GetUserListByWarehouseID(WarehouseID, profile.DBConnection._constr).ToList(); UsersList = UsersList.Where(x => x.userID == profile.Personal.UserID).ToList(); vGetUserProfileByUserID select = new vGetUserProfileByUserID() { userID = 0, userName = "******" }; UsersList.Insert(0, select); ddlDispatchBy.DataSource = UsersList; ddlDispatchBy.DataBind(); ddlDispatchBy.SelectedIndex = ddlDispatchBy.Items.IndexOf(ddlDispatchBy.Items.FindByValue(dispatchLst.DispatchBy.ToString())); ddlStatus.DataSource = WMFillStatus(); ddlStatus.DataBind(); ddlStatus.SelectedIndex = ddlStatus.Items.IndexOf(ddlStatus.Items.FindByValue(dispatchLst.Status.ToString())); Grid1.DataSource = Outbound.GetDispatchSkuDetailByDispatchID(long.Parse(dispatchLst.ID.ToString()), profile.DBConnection._constr); Grid1.DataBind(); ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeRequest" + Session.SessionID, "changemode(true, 'dvDDetail');LoadingOff();", true); } else if (Session["DispID"] != null) { selQCID = long.Parse(QCID.ToString()); BrilliantWMS.WMSOutbound.WMS_VW_GetDispatchDetails dispatchLst = new WMSOutbound.WMS_VW_GetDispatchDetails(); dispatchLst = Outbound.GetDispatchDetailsByDispatchID(selQCID, profile.DBConnection._constr); lblDispatchNo.Text = dispatchLst.ID.ToString(); UCDispatchDate.Date = dispatchLst.DispatchDate; txtRemark.Text = dispatchLst.Remark.ToString(); txtAirwayBill.Text = dispatchLst.AirwayBill.ToString(); txtShippingType.Text = dispatchLst.ShippingType.ToString(); UC_ShippingDate.Date = dispatchLst.ShippingDate; UCExpDeliveryDate.Date = dispatchLst.ExpDeliveryDate; txtTransporterName.Text = dispatchLst.TransporterName.ToString(); txtTransporterRemark.Text = dispatchLst.TransporterRemark.ToString(); long WarehouseID = long.Parse(dispatchLst.StoreId.ToString()); UsersList = objService.GetUserListByWarehouseID(WarehouseID, profile.DBConnection._constr).ToList(); UsersList = UsersList.Where(x => x.userID == profile.Personal.UserID).ToList(); vGetUserProfileByUserID select = new vGetUserProfileByUserID() { userID = 0, userName = "******" }; UsersList.Insert(0, select); ddlDispatchBy.DataSource = UsersList; ddlDispatchBy.DataBind(); ddlDispatchBy.SelectedIndex = ddlDispatchBy.Items.IndexOf(ddlDispatchBy.Items.FindByValue(dispatchLst.DispatchBy.ToString())); ddlStatus.DataSource = WMFillStatus(); ddlStatus.DataBind(); ddlStatus.SelectedIndex = ddlStatus.Items.IndexOf(ddlStatus.Items.FindByValue(dispatchLst.Status.ToString())); Grid1.DataSource = Outbound.GetDispatchSkuDetailByDispatchID(long.Parse(dispatchLst.ID.ToString()), profile.DBConnection._constr); Grid1.DataBind(); ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeRequest" + Session.SessionID, "changemode(true, 'dvDDetail');LoadingOff();", true); } else if (Session["TRID"] != null) { selQCID = long.Parse(QCID.ToString()); BrilliantWMS.WMSOutbound.WMS_VW_GetDispatchDetails dispatchLst = new WMSOutbound.WMS_VW_GetDispatchDetails(); dispatchLst = Outbound.GetDispatchDetailsByQCID(selQCID, profile.DBConnection._constr); lblDispatchNo.Text = dispatchLst.ID.ToString(); UCDispatchDate.Date = dispatchLst.DispatchDate; txtRemark.Text = dispatchLst.Remark.ToString(); txtAirwayBill.Text = dispatchLst.AirwayBill.ToString(); txtShippingType.Text = dispatchLst.ShippingType.ToString(); UC_ShippingDate.Date = dispatchLst.ShippingDate; UCExpDeliveryDate.Date = dispatchLst.ExpDeliveryDate; txtTransporterName.Text = dispatchLst.TransporterName.ToString(); txtTransporterRemark.Text = dispatchLst.TransporterRemark.ToString(); long WarehouseID = long.Parse(dispatchLst.StoreId.ToString()); UsersList = objService.GetUserListByWarehouseID(WarehouseID, profile.DBConnection._constr).ToList(); UsersList = UsersList.Where(x => x.userID == profile.Personal.UserID).ToList(); vGetUserProfileByUserID select = new vGetUserProfileByUserID() { userID = 0, userName = "******" }; UsersList.Insert(0, select); ddlDispatchBy.DataSource = UsersList; ddlDispatchBy.DataBind(); ddlDispatchBy.SelectedIndex = ddlDispatchBy.Items.IndexOf(ddlDispatchBy.Items.FindByValue(dispatchLst.DispatchBy.ToString())); ddlStatus.DataSource = WMFillStatus(); ddlStatus.DataBind(); ddlStatus.SelectedIndex = ddlStatus.Items.IndexOf(ddlStatus.Items.FindByValue(dispatchLst.Status.ToString())); Grid1.DataSource = Outbound.GetDispatchSkuDetailByDispatchID(long.Parse(dispatchLst.ID.ToString()), profile.DBConnection._constr); Grid1.DataBind(); ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeRequest" + Session.SessionID, "changemode(true, 'dvDDetail');LoadingOff();", true); } } catch { } finally { Outbound.Close(); objService.Close(); UsersList.Clear(); } }