Ejemplo n.º 1
0
        public void FillClientRecord(int clientID)
        {
            try
            {
                //    lblMessage.Text = "";


                //load the item
                FBClientsController controller = new FBClientsController();
                FBClientsInfo       item       = controller.FBClients_GetByID(this.PortalId, clientID);



                if (item != null)
                {
                    //  Response.Write(item);

                    StringBuilder builder    = new StringBuilder();
                    string        ClientInfo = "";


                    string _phoneType = "";


                    if (item.ClientPhoneType == "0")
                    {
                        _phoneType = "";
                    }

                    else
                    {
                        _phoneType = item.ClientPhoneType + " ";
                    }



                    //Set Page Name
                    SetPageName("Christmas Toys Voucher for " + item.ClientFirstName + " " + item.ClientLastName);


                    // QUICK VIEW SECTION
                    ClientInfo = item.ClientFirstName + " " + item.ClientLastName + " - " + item.ClientAddress + ", " + item.ClientTown + ", " + item.ClientState + " " + item.ClientZipCode
                                 + "<br />" + _phoneType.ToString() + "Phone: " + item.ClientPhone

                                 + "<br />Entry Date: " + item.CreatedOnDate.ToShortDateString()
                                 + "<br /><font color='Red'>Client ID: " + item.ClientID + "</font>";

                    lblMessage.Text = ClientInfo.ToString();
                }
                else
                {
                    Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Ejemplo n.º 2
0
        public void SaveImageToDatabase(string imageData)
        {
            try
            {
                FBClientsController controller = new FBClientsController();
                FBClientsInfo       item       = new FBClientsInfo();

                byte[] imageBytes = Convert.FromBase64String(imageData.Replace("data:image/png;base64,", String.Empty));
                item.ClientID        = clientId;
                item.IDPhoto         = imageBytes;
                item.CreatedByUserID = this.UserId;

                controller.FBClients_IDPhoto_Insert(item);

                FillClientRecord(clientId);
            }

            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Ejemplo n.º 3
0
        public void FillClientRecord(int clientID)
        {
            try
            {
                //load the item
                FBClientsController controller = new FBClientsController();
                FBClientsInfo       item       = controller.FBClients_GetByID(this.PortalId, clientID);

                if (item != null)
                {
                    LabelClientInfo.Text  = item.ClientFirstName + ' ' + item.ClientLastName + " - ";
                    LabelClientInfo.Text += item.ClientAddress + ", " + item.ClientTown + ", " + item.ClientState + " " + item.ClientZipCode;
                    if (item.IDPhoto != null)
                    {
                        ImageIDClient.Visible = true;
                        byte[] imagem      = (byte[])(item.IDPhoto);
                        string PROFILE_PIC = Convert.ToBase64String(imagem);

                        ImageIDClient.ImageUrl      = String.Format("data:image/png;base64,{0}", PROFILE_PIC);
                        ImageIDClient.AlternateText = item.ClientFirstName + ' ' + item.ClientLastName;
                    }
                    else
                    {
                        ImageIDClient.Visible = false;
                    }
                }
                else
                {
                    Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }