protected void btnAddURL_Click(object sender, EventArgs e)
 {
     lblURLError.Text = "";
     if (txtURL.Text.Trim() == "" || txtURLName.Text.Trim() == "")
     {
         lblURLError.Text = "URL and URL Name cannot be empty";
     }
     //else if (!System.Text.RegularExpressions.Regex.IsMatch(txtURL.Text, "^(ht|f)tp(s?)/://[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?$"))
     //{
     //    lblURLError.Text = "Invalid URL";
     //}
     else
     {
         if (hWebinarID.Value != "0" || hWebinarID.Value != "")
         {
             WebinarResource objWebinarResource = new WebinarResource();
             objWebinarResource.WebinarID = Convert.ToInt32(hWebinarID.Value);
             objWebinarResource.DocID = 0;
             objWebinarResource.ResourceType = "URL";
             objWebinarResource.ResourceTitle = txtURLName.Text;
             objWebinarResource.ResourceValue = txtURL.Text;
             objWebinarResource.IsBriefcase = true;
             if (objWebinarDA.InsertWebinarResources(objWebinarResource) == 0)
                 lblURLError.Text = "URL and URL Name already exist.";
             else
             {
                 txtURL.Text = "";
                 txtURLName.Text = "";
                 popResource();
             }
         }
     }
 }
Ejemplo n.º 2
0
        public void aupPresentation_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            Session["FolderType"] = "PRESENTATION";
            telerikAsyncUploadResult result = e.UploadResult as telerikAsyncUploadResult;
            if (result != null)
            {
                if (result.DocumentID > 0)
                {
                    WebinarResource objWebinarResource = new WebinarResource();
                    objWebinarResource.WebinarID = Convert.ToInt32(hWebinarID.Value);
                    objWebinarResource.DocID = result.DocumentID;
                    objWebinarResource.ResourceType = "Presentation";
                    objWebinarResource.ResourceTitle = e.File.FileName;
                    objWebinarResource.ResourceValue = "";
                    objWebinarResource.IsBriefcase = false; //chkAddtoBC.Checked;
                    if (objWebinarDA.InsertWebinarResources(objWebinarResource) == 0)
                    {
                        DocAccess objDocAccess = new DocAccess();
                        objDocAccess.removeDocumentFromRepositary(result.DocumentID,Convert.ToInt32(Session["ClientID"]),"WebinarDocs");
                    }

                    //if (chkAddtoBC.Checked && !chkConfig8.Checked)
                    //{
                    //    objWebinarDA.SaveWebinarAudience(Convert.ToInt32(hWebinarID.Value), "Content", (Convert.ToInt32(ClientConfigMaster.Audi_Component_Content)).ToString());
                    //    chkConfig8.Checked = true;
                    //}
                    // popResource(); // popPresentation();
                }
            }
        }
Ejemplo n.º 3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     WebinarResource objWebinarResource = new WebinarResource();
     objWebinarResource.WebinarID = Convert.ToInt32(hWebinarID.Value);
     objWebinarResource.DocID = Convert.ToInt32(hDocId.Value);
     objWebinarResource.LogoUrlName = txtURLName.Text;
     objWebinarResource.LogoUrl = txtURL.Text;
     objWebinarDA.UpdateWebinarResources(objWebinarResource);
     hModalStatusFlg.Value = "1";
 }
Ejemplo n.º 4
0
 public void aupLogo_FileUploaded(object sender, FileUploadedEventArgs e)
 {
     telerikAsyncUploadResult result = e.UploadResult as telerikAsyncUploadResult;
     if (result != null)
     {
         if (result.DocumentID > 0)
         {
             WebinarResource objWebinarResource = new WebinarResource();
             objWebinarResource.WebinarID = Convert.ToInt32(hWebinarID.Value);
             objWebinarResource.DocID = result.DocumentID;
             objWebinarResource.ResourceType = (rcmbHeader.SelectedValue == "BANNER" ? "BANNER" : "Logo");
             objWebinarResource.ResourceTitle = e.File.FileName;
             objWebinarResource.ResourceValue = "";
             objWebinarResource.IsBriefcase = false;
             objWebinarDA.InsertWebinarResources(objWebinarResource);
         }
     }
 }
 public void aupContent_FileUploaded(object sender, FileUploadedEventArgs e)
 {
     telerikAsyncUploadResult result = e.UploadResult as telerikAsyncUploadResult;
     if (result != null)
     {
         if (result.DocumentID > 0)
         {
             WebinarResource objWebinarResource = new WebinarResource();
             objWebinarResource.WebinarID = Convert.ToInt32(hWebinarID.Value);
             objWebinarResource.DocID = result.DocumentID;
             objWebinarResource.ResourceType = "Content Doc";
             objWebinarResource.ResourceTitle = e.File.FileName;
             objWebinarResource.ResourceValue = "";
             objWebinarResource.IsBriefcase = true;
             objWebinarDA.InsertWebinarResources(objWebinarResource);
             popResource();
         }
     }
 }
Ejemplo n.º 6
0
 public int UpdateWebinarResources(WebinarResource objWebinarResource)
 {
     int rtnVal = 0;
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             MySqlCommand sqlCmd = new MySqlCommand("spWebinarResourceUpdate", sqlCon);
             sqlCon.Open();
             sqlCmd.CommandType = CommandType.StoredProcedure;
             sqlCmd.Parameters.Add(new MySqlParameter("pWebinarID", objWebinarResource.WebinarID));
             sqlCmd.Parameters.Add(new MySqlParameter("pDocId", objWebinarResource.DocID));
             sqlCmd.Parameters.Add(new MySqlParameter("pLogoUrlName", objWebinarResource.LogoUrlName));
             sqlCmd.Parameters.Add(new MySqlParameter("pLogoUrl", objWebinarResource.LogoUrl));
             MySqlDataReader reader = sqlCmd.ExecuteReader();
             if (reader.HasRows)
             {
                 reader.Read();
                 rtnVal = Convert.ToInt32(reader[0]);
             }
             reader.Close();
             reader = null;
             sqlCon.Close();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
     return rtnVal;
 }
Ejemplo n.º 7
0
 public void InsertRegFormResources(WebinarResource objWebinarResource)
 {
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             MySqlCommand sqlCmd = new MySqlCommand(DBQuery.sqlWebinarResourceInsert, sqlCon);
             sqlCon.Open();
             sqlCmd.CommandType = CommandType.Text;
             sqlCmd.Parameters.Add(new MySqlParameter("@webinarID", objWebinarResource.WebinarID));
             sqlCmd.Parameters.Add(new MySqlParameter("@docID", objWebinarResource.DocID));
             sqlCmd.Parameters.Add(new MySqlParameter("@resourceType", objWebinarResource.ResourceType));
             sqlCmd.Parameters.Add(new MySqlParameter("@resourceOrder", objWebinarResource.ResourceOrder));
             sqlCmd.Parameters.Add(new MySqlParameter("@ResourceTitle", objWebinarResource.ResourceTitle));
             sqlCmd.Parameters.Add(new MySqlParameter("@resourceValue", objWebinarResource.ResourceValue));
             sqlCmd.ExecuteNonQuery();
             sqlCon.Close();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Ejemplo n.º 8
0
 //protected void aupLogo_FileUploaded(object sender, FileUploadedEventArgs e)
 //{
 //    RadBinaryImage rimg = (RadBinaryImage)this.FindControl("Thumbnail" + hCurrentImg.Value);
 //    if (rimg != null)
 //    {
 //        rimg.Width = Unit.Pixel(200);
 //        rimg.Height = Unit.Pixel(150);
 //        using (Stream stream = e.File.InputStream)
 //        {
 //            byte[] imageData = new byte[stream.Length];
 //            stream.Read(imageData, 0, (int)stream.Length);
 //            rimg.DataValue = imageData;
 //        }
 //        int curr = Convert.ToInt32(hCurrentImg.Value);
 //        if (curr < 4)
 //        {
 //            hCurrentImg.Value = (curr + 1).ToString();
 //            if (curr >= 4)
 //                aupLogo.Visible = false;
 //        }
 //    }
 //}
 public void aupLogo_FileUploaded(object sender, FileUploadedEventArgs e)
 {
     telerikAsyncUploadResult result = e.UploadResult as telerikAsyncUploadResult;
     if (result != null)
     {
         if (result.DocumentID > 0)
         {
             int idx = Convert.ToInt32(hCurrentImg.Value);
             if (rcmbHeader.SelectedIndex != 1)
                 idx = 1;
             WebinarResource objWebinarResource = new WebinarResource();
             objWebinarResource.WebinarID = Convert.ToInt32(hWebinarID.Value);
             objWebinarResource.DocID = result.DocumentID;
             objWebinarResource.ResourceType = rcmbHeader.SelectedValue;
             objWebinarResource.ResourceOrder = idx;
             objWebinarDA.InsertRegFormResources(objWebinarResource);
             ++idx;
             hCurrentImg.Value = idx.ToString();
         }
     }
 }