コード例 #1
0
        /// <summary>
        /// Get Promoter Details
        /// </summary>
        /// <returns></returns>
        public PromoterDetails GetDetails()
        {
            var result = new PromoterDetails();
            string[,] str = new string[1, 2];
            str[0, 0] = "@id";
            str[0, 1] = encryptdecrypt.Decrypt(HttpContext.Current.User.Identity.Name.ToString());//( Current Promoter Id )
            string xmlResult = db.StoreprocedureExecuteQueryReturned("usp_Promoter_GetPromoter", str);
            var serializer = new XmlSerializer(typeof(PromoterDetails));
            if (!string.IsNullOrEmpty(xmlResult))
            {
                using (var reader = new StringReader(xmlResult))
                {
                    result = (PromoterDetails)serializer.Deserialize(reader);
                }
            }

            return result;
        }
コード例 #2
0
        public PromoterDetailsModel(PromoterDetails promoterDetails)
        {
            // TODO: Complete member initialization
            this.Id = promoterDetails.Id;

            this.Name = promoterDetails.Name;

            this.Password =encryptdecrypt.Decrypt(promoterDetails.Password);

            this.Phone1 = promoterDetails.Phone1;

            this.Phone2 = promoterDetails.Phone2;

            this.Username = promoterDetails.Username;

            this.Description = promoterDetails.Description;

            this.Email = promoterDetails.Email;
        }