Ejemplo n.º 1
0
        //Get Client Detail Items
        public List <ClientProfileAdminItemVM> GetClientProfilePanelClientProfileDataElements(int clientProfileAdminGroupId, int clientProfilePanelId)
        {
            ClientProfileMoveStatusRepository clientProfileMoveStatusRepository = new ClientProfileMoveStatusRepository();
            List <ClientProfileAdminItemRow>  clientProfileAdminItems           = new List <ClientProfileAdminItemRow>();
            List <ClientProfileAdminItemVM>   clientProfileAdminItemVMs         = new List <ClientProfileAdminItemVM>();

            clientProfileAdminItems = (from n in db.spDesktopDataAdmin_SelectClientProfilePanelClientProfileAdminItems_v1(clientProfileAdminGroupId, clientProfilePanelId)
                                       select new ClientProfileAdminItemRow
            {
                ClientProfileAdminItemId = n.ClientProfileAdminItemId,
                ClientProfileDataElementId = (int)n.ClientProfileDataElementId,
                ClientProfileDataElementName = n.ClientProfileDataElementName,
                ClientProfileAdminGroupId = n.ClientProfileAdminGroupId,
                MandatoryFlag = n.MandatoryFlag,
                DefaultGDSCommandFormat = n.DefaultGDSCommandFormat,
                DefaultRemark = n.DefaultRemark,
                ToolTip = n.ToolTip,
                ClientProfileMoveStatusId = n.ClientProfileMoveStatusId,
                ClientProfileAdminItemSequenceNumber = n.ClientProfileAdminItemSequenceNumber,
                VersionNumber = n.VersionNumber,
                Source = n.Source,
                InheritedFlag = n.InheritedFlag
            }).ToList();

            foreach (ClientProfileAdminItemRow r in clientProfileAdminItems)
            {
                ClientProfileAdminItemVM clientProfileAdminItemVM = new ClientProfileAdminItemVM();
                clientProfileAdminItemVM.ClientProfileAdminItem = r;

                SelectList clientProfileMoveStatuses = new SelectList(clientProfileMoveStatusRepository.GetAllClientProfileMoveStatuses().ToList(), "ClientProfileMoveStatusId", "ClientProfileMoveStatusCode", clientProfileAdminItemVM.ClientProfileAdminItem.ClientProfileMoveStatusId);
                clientProfileAdminItemVM.ClientProfileMoveStatuses = clientProfileMoveStatuses;


                clientProfileAdminItemVMs.Add(clientProfileAdminItemVM);
            }
            return(clientProfileAdminItemVMs);
        }
Ejemplo n.º 2
0
        public XmlElement ClientProfileAdminItem(XmlDocument doc, ClientProfileAdminItemVM item)
        {
            XmlElement xmlClientProfileAdminItem = doc.CreateElement("ClientProfileAdminItem");

            XmlElement xmlClientProfileAdminItemId = doc.CreateElement("ClientProfileAdminItemId");

            xmlClientProfileAdminItemId.InnerText = item.ClientProfileAdminItem.ClientProfileAdminItemId.ToString();
            xmlClientProfileAdminItem.AppendChild(xmlClientProfileAdminItemId);

            XmlElement xmlClientProfileDataElementId = doc.CreateElement("ClientProfileDataElementId");

            xmlClientProfileDataElementId.InnerText = item.ClientProfileAdminItem.ClientProfileDataElementId.ToString();
            xmlClientProfileAdminItem.AppendChild(xmlClientProfileDataElementId);

            ///XmlElement xmlClientProfileAdminGroupId = doc.CreateElement("ClientProfileAdminGroupId");
            ///xmlClientProfileAdminGroupId.InnerText = item.ClientProfileAdminGroupId.ToString();
            /// xmlClientProfileAdminItem.AppendChild(xmlClientProfileAdminGroupId);

            XmlElement xmlClientProfileDataElementName = doc.CreateElement("ClientProfileDataElementName");

            if (item.ClientProfileAdminItem.ClientProfileDataElementName != null)
            {
                xmlClientProfileDataElementName.InnerText = item.ClientProfileAdminItem.ClientProfileDataElementName.ToString();
            }
            xmlClientProfileAdminItem.AppendChild(xmlClientProfileDataElementName);

            XmlElement xmlMandatoryFlag = doc.CreateElement("MandatoryFlag");

            xmlMandatoryFlag.InnerText = item.ClientProfileAdminItem.MandatoryFlag == true ? "1" : "0";
            xmlClientProfileAdminItem.AppendChild(xmlMandatoryFlag);

            XmlElement xmlDefaultGDSCommandFormat = doc.CreateElement("DefaultGDSCommandFormat");

            if (item.ClientProfileAdminItem.DefaultGDSCommandFormat != null)
            {
                xmlDefaultGDSCommandFormat.InnerText = item.ClientProfileAdminItem.DefaultGDSCommandFormat.ToString();
            }
            xmlClientProfileAdminItem.AppendChild(xmlDefaultGDSCommandFormat);

            XmlElement xmlDefaultRemark = doc.CreateElement("DefaultRemark");

            if (item.ClientProfileAdminItem.DefaultRemark != null)
            {
                xmlDefaultRemark.InnerText = item.ClientProfileAdminItem.DefaultRemark.ToString();
            }
            xmlClientProfileAdminItem.AppendChild(xmlDefaultRemark);

            XmlElement xmlToolTip = doc.CreateElement("ToolTip");

            if (item.ClientProfileAdminItem.ToolTip != null)
            {
                xmlToolTip.InnerText = item.ClientProfileAdminItem.ToolTip.ToString();
            }
            xmlClientProfileAdminItem.AppendChild(xmlToolTip);

            XmlElement xmlClientProfileMoveStatusId = doc.CreateElement("ClientProfileMoveStatusId");

            xmlClientProfileMoveStatusId.InnerText = item.ClientProfileAdminItem.ClientProfileMoveStatusId.ToString();
            xmlClientProfileAdminItem.AppendChild(xmlClientProfileMoveStatusId);

            XmlElement xmlVersionNumber = doc.CreateElement("VersionNumber");

            xmlVersionNumber.InnerText = item.ClientProfileAdminItem.VersionNumber.ToString();
            xmlClientProfileAdminItem.AppendChild(xmlVersionNumber);

            return(xmlClientProfileAdminItem);
        }