-2

Can someone help me convert this code into PHP plz

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class scheduleGame : System.Web.UI.Page
{
    protected projectServices.project objProj;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["proj_id"] == null)
        {
            Response.Redirect("login.aspx");
        }
        
        if (!IsPostBack)
        {
            //if (Session["slots"] != null) Session.Remove("slots");
            setStartDates();
            setProject();
            fillWeek();
            fillWeek2();
        }
        else
        {
            objProj = (projectServices.project)ViewState["project"];
        }
        
    }

    private void setStartDates()
    {
        appConfigServices.appConfig objAC = appConfigServices.getAppConfig();
        string w1 = Convert.ToDateTime(objAC.week1startdate.ToString()).Day + ":" + Convert.ToDateTime(objAC.week1startdate.ToString()).Month + "/" + Convert.ToDateTime(objAC.week1startdate.ToString()).Year;
        string w2 = Convert.ToDateTime(objAC.week2startdate.ToString()).Day + ":" + Convert.ToDateTime(objAC.week2startdate.ToString()).Month + "/" + Convert.ToDateTime(objAC.week2startdate.ToString()).Year;
        w1 = objAC.w1Day.ToString() + ":" + objAC.w1Month + "/" + objAC.w1Year;
        w2 = objAC.w2Day.ToString() + ":" + objAC.w2Month + "/" + objAC.w2Year;

        //Response.Write(w1 + " - " + w2);
        hdnStartWeekDate.Value = w1;
        hdnStartWeek2Date.Value = w2;
    }
    
    private void preselectSlots()
    {
        if (Session["slots"] != null)
        {
            string[] slotIds = Session["slots"].ToString().Replace("'", "").Split(',');
            string slotId;

            foreach (string sid in slotIds)
            {
                //Response.Write(dgWeek.Items.Count);
                foreach (DataGridItem dgi in dgWeek.Items)
                {
                    
                    for (int i = 1; i < dgWeek.Columns.Count; i++)
                    {
                        int slotType = Convert.ToInt16(((include_splitslot)dgi.Cells[i].Controls[1]).slotType());
                        slotId = ((include_splitslot)dgi.Cells[i].Controls[1]).slotId();
                        
                        if (sid == slotId.ToString())
                        {
                            //Response.Write(sid + "-" + slotId.ToString() + "<br>");
                            ((include_splitslot)dgi.Cells[i].Controls[1]).selectSlot();
                        }
                    }
                }
            }
        }
    }

 //   private void preselectSlots2()

Thanks,

Mike

Edited by MikeGore: n/a

4
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by MikeGore
-2

I think only the thread starter can delete the thread.

I am the thread starter. There is no option to delete.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.