public static string GetClinetNameById(Guid Id) { try { ClientBLL objClient = new ClientBLL(); Membership.Client objWebServiceClient; Membership.MemberShipLookUp objMembership = new WarehouseApplication.Membership.MemberShipLookUp(); objWebServiceClient = objMembership.GetClient(Id); if (objWebServiceClient != null) { return(objWebServiceClient.Name + " - " + objWebServiceClient.IdNo + ""); } else { Membership.MembershipEntities me = new WarehouseApplication.Membership.MembershipEntities(); me = objMembership.GetEntityByGuid(Id); if (me != null) { return(me.OrganizationName + " - " + me.StringIdNo); } else { return(""); } } } catch (Exception ex) { throw new Exception("Can't get Client from service please trya again.", ex); } }
public static ClientBLL GetClinet(string IdNo) { //Todo Ask sisay Membership.MembershipEntities objentity; try { Membership.MemberShipLookUp objMembership = new WarehouseApplication.Membership.MemberShipLookUp(); objentity = objMembership.GetEntityByIdNo(IdNo); if (objentity != null) { string status = objentity.Status; /// Peabean client problem - Nov 2 2010 //if (status == "Active") //{ //ClientBLL obj = new ClientBLL(objentity.UniqueIdentifier, IdNo, objentity.OrganizationName); //return obj; //} //else // { // return null; // } if (status == "Terminated") { return(null); } else { ClientBLL objC = new ClientBLL(objentity.UniqueIdentifier, IdNo, objentity.OrganizationName); return(objC); } } else { return(null); } } catch (Exception ex) { throw new Exception("Unable to Get membership Service", ex); } }
public PUNReportData GetPUNReport(Guid punId) { PickupNoticeInformation.PickupNoticeAgentInformation punAgent = PickupNoticeInformation.PickupNoticeAgents[0]; BLL.CommodityGradeBLL commodityGrade = BLL.CommodityGradeBLL.GetCommodityGrade(PickupNoticeInformation.CommodityGradeId); BLL.ClientBLL clientBLL = BLL.ClientBLL.GetClinet(PickupNoticeInformation.ClientId); Membership.MemberShipLookUp memberLookup = new WarehouseApplication.Membership.MemberShipLookUp(); Membership.Member member = memberLookup.GetMember(PickupNoticeInformation.MemberId); Membership.Rep rep = memberLookup.GetRep(new Guid(PickupNoticeInformation.RepId)); string status = ((PUNStatusType)PickupNoticeInformation.Status).ToString(); PUNReportData reportData = new PUNReportData() { AgentName = punAgent.AgentName, AgentTel = punAgent.AgentTel, Client = clientBLL.ClientName, ClientId = clientBLL.ClientId, ExpectedPickupDate = PickupNoticeInformation.ExpectedPickupDate, ExpirationDate = PickupNoticeInformation.ExpirationDate, Member = (member == null)?null:member.Name, MemberId = (member == null) ? null : member.IdNo, NIDNumber = punAgent.NIDNumber, NIDType = SystemLookup.LookupSource.GetLookup("NIDType")[punAgent.NIDType], PickupNoticeId = PickupNoticeInformation.PickupNoticeId, Rep = rep.RepName, RepId = rep.IDNO, Status = status }; foreach (PickupNoticeInformation.WarehouseReceiptInformation wr in PickupNoticeInformation.WarehouseReceipts) { reportData.WRs.Add(new WRReportData() { CommodityGrade = commodityGrade.GradeName, NetWeight = wr.Weight, PickupNoticeId = wr.PickupNoticeId, Quantity = wr.Quantity, WHR = wr.WarehouseReceiptId, GRNNo = wr.GRNNo }); } return(reportData); }
public static List <ClientBLL> GetAllClient() { try { List <ClientBLL> lstClient = new List <ClientBLL>(); Membership.MemberShipLookUp objMembership = new WarehouseApplication.Membership.MemberShipLookUp(); Membership.Client[] listClient; listClient = objMembership.GetClients(); foreach (Membership.Client c in listClient) { ClientBLL objMyClient = new ClientBLL(); objMyClient.ClientId = c.IdNo; objMyClient.ClientUniqueIdentifier = c.ClientId; objMyClient.ClientName = c.Name; lstClient.Add(objMyClient); } return(lstClient); } catch (Exception ex) { throw new Exception("Can not get Client information", ex); } }
public static ClientBLL GetClinet(Guid Id) { try { ClientBLL objClient = new ClientBLL(); Membership.Client objWebServiceClient; Membership.MemberShipLookUp objMembership = new WarehouseApplication.Membership.MemberShipLookUp(); objWebServiceClient = objMembership.GetClient(Id); if (objWebServiceClient != null) { objClient.ClientUniqueIdentifier = objWebServiceClient.ClientId; objClient.ClientName = objWebServiceClient.Name; objClient.ClientId = objWebServiceClient.IdNo; return(objClient); } else { Membership.MembershipEntities me = new WarehouseApplication.Membership.MembershipEntities(); me = objMembership.GetEntityByGuid(Id); if (me != null) { objClient.ClientUniqueIdentifier = Id; objClient.ClientName = me.OrganizationName.ToString(); objClient.ClientId = me.StringIdNo; return(objClient); } else { return(null); } } } catch (Exception ex) { throw new Exception("Can't get Client from service please trya again.", ex); } }