Exemple #1
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            bool validImage = false;

            advertiser logo = new advertiser();

            validImage = logo.validateLogoDimensions(fiuLogo);

            if (validImage)
            {
                bool flag = false;
                flag = logo.updateLogo(fiuLogo.FileBytes, logo.getCompanyID(User.Identity.Name));
                if (flag)
                {
                    lblMessage.Text      = "Upload Successful";
                    lblMessage.Visible   = true;
                    lblMessage.ForeColor = System.Drawing.Color.Green;
                }
                else
                {
                    lblMessage.Text      = "Upload Failed";
                    lblMessage.Visible   = true;
                    lblMessage.ForeColor = System.Drawing.Color.Red;
                }
            }
            else
            {
                lblMessage.Text      = "Upload Failed. Please ensure image is in .jpg or .jpeg format and having dimensions 150x100.";
                lblMessage.Visible   = true;
                lblMessage.ForeColor = System.Drawing.Color.Red;
            }
        }
        protected void FillGridView()
        {
            advertiser    company = new advertiser();
            SqlDataSource sqlDataSourcePurchasedJobseekers = new SqlDataSource();

            sqlDataSourcePurchasedJobseekers.ConnectionString = ConfigurationManager.ConnectionStrings["ZamJobsConnString"].ConnectionString.ToString();
            string companyID = company.getCompanyID(User.Identity.Name);

            sqlDataSourcePurchasedJobseekers.SelectCommand = "SELECT jobsdb_PurchaseJobseeker.Company, jobsdb_JobSeeker.ID, jobsdb_JobSeeker.FirstName, jobsdb_JobSeeker.LastName, jobsdb_JobSeeker.ContactNumber, jobsdb_JobSeeker.Email FROM jobsdb_JobSeeker INNER JOIN jobsdb_PurchaseJobseeker ON jobsdb_JobSeeker.ID = jobsdb_PurchaseJobseeker.Jobseeker WHERE Company ='" + companyID + "'";
            GridView1.DataSource = sqlDataSourcePurchasedJobseekers;
            GridView1.DataBind();
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            advertiser advertiser = new advertiser();
            string     ID         = advertiser.getCompanyID(User.Identity.Name);

            dataAccess database = new dataAccess();

            System.Data.DataTable logos = database.getTable("SELECT Logo FROM jobsdb_Employer Where ID='" + ID + "'");
            if (logos.Rows[0]["Logo"].ToString() == "")
            {
                imgLogo.ImageUrl = "~/Images/no-logo.gif";
            }
            else
            {
                imgLogo.ImageUrl = "UploadLogo.aspx?imageID=" + ID;
                displayAdvertiserLogo();
            }
        }
Exemple #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["PostID"] != null)
     {
         advertiser    jobpost              = new advertiser();
         string        companyID            = jobpost.getCompanyID(User.Identity.Name);
         string        jobpostID            = Request.QueryString["PostID"].ToString();
         string        selectQuery          = @"SELECT        ID, Title, Overview,
                      (SELECT        CompanyName
                        FROM            jobsdb_Employer
                        WHERE        (jobsdb_JobPost.Company = ID)) AS Company,
                      (SELECT        Country
                        FROM            jobsdb_Country
                        WHERE        (ID = jobsdb_JobPost.Country)) AS Country,
                      (SELECT        Region
                        FROM            jobsdb_Region
                        WHERE        (ID = jobsdb_JobPost.Region)) AS Region,
                      (SELECT        Location
                        FROM            jobsdb_Location
                        WHERE        (ID = jobsdb_JobPost.Location)) AS Location,
                      (SELECT        Category
                        FROM            jobsdb_JobCategory
                        WHERE        (ID = jobsdb_JobPost.Category)) AS Category,
                      (SELECT        JobType
                        FROM            jobsdb_JobType
                        WHERE        (ID = jobsdb_JobPost.Type)) AS Type,
                      WorkExperience, WorkExperienceComment,
                      (SELECT        EducationLevel
                        FROM            jobsdb_Education
                        WHERE        (ID = jobsdb_JobPost.EducationLevel)) AS EducationLevel, EducationLevelComment, PersonalAttributes, Competencies, PostDate, ExpireDate
                     FROM            jobsdb_JobPost
                 WHERE        ID ='" + jobpostID + "' AND Company='" + companyID + "'";
         SqlDataSource sqlDataSourceJobPost = new SqlDataSource();
         sqlDataSourceJobPost.ConnectionString = ConfigurationManager.ConnectionStrings["ZamJobsConnString"].ConnectionString.ToString();
         sqlDataSourceJobPost.SelectCommand    = selectQuery;
         DetailsView1.DataSource = sqlDataSourceJobPost;
         DetailsView1.DataBind();
     }
 }
Exemple #5
0
        protected void btnCheckout_Click(object sender, EventArgs e)
        {
            dataAccess database     = new dataAccess();
            advertiser purchaseUnts = new advertiser();
            Int64      ID           = 0;
            string     insertString = "INSERT INTO jobsdb_UnitOrder (Employer, UnitQty, UnitAmount, Date, Paid, Credited, Active) VALUES ('" + purchaseUnts.getCompanyID(User.Identity.Name) +
                                      "','" + txtTotalUnits.Text.ToString() + "','" + unitAmount + "',GETDATE(),'N','N','Y'); SELECT SCOPE_IDENTITY()";

            ID = database.insertData_ReturnID(insertString);

            Response.Redirect("Order.aspx?OrderID=" + ID);
        }