예제 #1
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            String Name  = (String)Session["UserId"];
            String path  = Server.MapPath("~/images/Mess");
            String upath = path + "\\" + Name;

            String[] arr = Directory.GetFiles(upath);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("MessLocation");
            Session.Remove("NearestLocation");
            Session.Remove("State");
            Session.Remove("City");
            Session.Remove("MonthlyPrice");
            Session.Remove("MessType");
            Session.Remove("TiffinFacility");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("Disable");
            Session.Remove("Counter");
            Session.Remove("Scheme");
            Session.Remove("ContactNo1");
            Session.Remove("ContactNo2");
            Session.Remove("FullChapati");
            Session.Remove("FullSabji");
            Session.Remove("FullRice");
            Session.Remove("FullDal");
            Session.Remove("FullSalad");
            Session.Remove("FullMonthlyPrice");
            Session.Remove("HalfChapati");
            Session.Remove("HalfSabji");
            Session.Remove("HalfRice");
            Session.Remove("HalfDal");
            Session.Remove("HalfSalad");
            Session.Remove("HalfMonthlyPrice");

            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                Response.Write("<script>alert('Add Deleted...')</script>");
                Server.Transfer("~/Account/UserPanel.aspx");
            }
        }
예제 #2
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            String Name  = (String)Session["UserId"];
            String path  = Server.MapPath("~/images/Mess");
            String upath = path + "\\" + Name;

            String[] arr = Directory.GetFiles(upath);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("MessLocation");
            Session.Remove("NearestLocation");
            Session.Remove("State");
            Session.Remove("City");
            Session.Remove("MonthlyPrice");
            Session.Remove("MessType");
            Session.Remove("TiffinFacility");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("Disable");
            Session.Remove("Counter");
            Session.Remove("Scheme");
            Session.Remove("ContactNo1");
            Session.Remove("ContactNo2");
            Session.Remove("FullChapati");
            Session.Remove("FullSabji");
            Session.Remove("FullRice");
            Session.Remove("FullDal");
            Session.Remove("FullSalad");
            Session.Remove("FullMonthlyPrice");
            Session.Remove("HalfChapati");
            Session.Remove("HalfSabji");
            Session.Remove("HalfRice");
            Session.Remove("HalfDal");
            Session.Remove("HalfSalad");
            Session.Remove("HalfMonthlyPrice");
            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                PanelUploadMess1.Visible = true;
                PanelUploadMess3.Visible = false;
            }
        }
예제 #3
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            String Name  = (String)Session["UserId"];
            String path  = Server.MapPath("~/images/Hostel");
            String upath = path + "\\" + Name;

            String[] arr = Directory.GetFiles(upath);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("ContactNo1");
            Session.Remove("ContactNo2");
            Session.Remove("State");
            Session.Remove("City");
            Session.Remove("HostelLocation");
            Session.Remove("NearestLocation");
            Session.Remove("HostelGender");
            Session.Remove("MessFacility");
            Session.Remove("Scheme");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("UploadPhoto3");
            Session.Remove("Counter");
            Session.Remove("Disable");
            Session.Remove("BathRoom");
            Session.Remove("HotWater");
            Session.Remove("Parking");
            Session.Remove("Wifi");
            Session.Remove("MoreAboutHostel");
            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                SqlDeleteDetails0.Delete();
                PanelUploadHostel1.Visible = true;
                PanelUploadHostel5.Visible = false;
                Response.Write("<script>alert('You Have to fill the Form again to edit your details..')</script>");
            }
        }
예제 #4
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            String Name  = (String)Session["UserId"];
            String path  = Server.MapPath("~/images/Hostel");
            String upath = path + "\\" + Name;

            String[] arr = Directory.GetFiles(upath);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("ContactNo1");
            Session.Remove("ContactNo2");
            Session.Remove("State");
            Session.Remove("City");
            Session.Remove("HostelLocation");
            Session.Remove("NearestLocation");
            Session.Remove("HostelGender");
            Session.Remove("MessFacility");
            Session.Remove("Scheme");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("UploadPhoto3");
            Session.Remove("Counter");
            Session.Remove("Disable");
            Session.Remove("BathRoom");
            Session.Remove("HotWater");
            Session.Remove("Parking");
            Session.Remove("Wifi");
            Session.Remove("MoreAboutHostel");
            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                SqlDeleteDetails0.Delete();
                Response.Write("<script>alert('Add Deleted..')</script>");
                Server.Transfer("~/Account/UserPanel.aspx");
            }
        }
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            String Name  = (String)Session["UserId"];
            String path  = Server.MapPath("~/images/Flat");
            String upath = path + "\\" + Name;

            String[] arr = Directory.GetFiles(upath);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("FlatLocation");
            Session.Remove("NearestLocation");
            Session.Remove("FlatGender");
            Session.Remove("ContactNo1");
            Session.Remove("ContactNo2");
            Session.Remove("State");
            Session.Remove("City");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("UploadPhoto3");
            Session.Remove("FlatArea");
            Session.Remove("FlatType");
            Session.Remove("LightBill");
            Session.Remove("BathRoom");
            Session.Remove("Floor");
            Session.Remove("SecurityDeposit");
            Session.Remove("Parking");
            Session.Remove("Rent");
            Session.Remove("MoreAboutFlat");
            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                Response.Write("<script>alert('Add Deleted...')</script>");
                Server.Transfer("~/Account/UserPanel.aspx");
            }
        }
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            String Name  = (String)Session["UserId"];
            String path  = Server.MapPath("~/images/Flat");
            String upath = path + "\\" + Name;

            String[] arr = Directory.GetFiles(upath);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("FlatLocation");
            Session.Remove("State");
            Session.Remove("City");
            Session.Remove("NearestLocation");
            Session.Remove("FlatGender");
            Session.Remove("ContactNo1");
            Session.Remove("ContactNo2");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("UploadPhoto3");
            Session.Remove("FlatArea");
            Session.Remove("FlatType");
            Session.Remove("LightBill");
            Session.Remove("BathRoom");
            Session.Remove("Floor");
            Session.Remove("SecurityDeposit");
            Session.Remove("Parking");
            Session.Remove("Rent");
            Session.Remove("MoreAboutFlat");
            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                PanelUploadFlat1.Visible = true;
                PanelUploadFlat3.Visible = false;
            }
        }
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            String Name  = (String)Session["UserId"];
            String path  = Server.MapPath("~/images/Room");
            String upath = path + "\\" + Name;

            String[] arr = Directory.GetFiles(upath);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("RoomLocation");
            Session.Remove("State");
            Session.Remove("City");
            Session.Remove("NearestLocation");
            Session.Remove("NoOfPerson");
            Session.Remove("RentPerHead");
            Session.Remove("RoomGender");
            Session.Remove("ContactNo1");
            Session.Remove("ContactNo2");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("UploadPhoto3");
            Session.Remove("LightBill");
            Session.Remove("BathRoom");
            Session.Remove("HotWater");
            Session.Remove("Cooking");
            Session.Remove("Parking");
            Session.Remove("Wifi");
            Session.Remove("MoreAboutRoom");
            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                PanelUploadRoom1.Visible = true;
                PanelUploadRoom3.Visible = false;
            }
        }
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            String ppath           = Server.MapPath("images");
            String NearestLocation = (String)Session["NearestLocation"];
            String Name            = (String)Session["Name"];
            String img             = ppath + "\\" + NearestLocation + "\\Room\\" + Name;

            String[] arr = Directory.GetFiles(img);
            foreach (String ipath in arr)
            {
                File.Delete(ipath);
            }
            Session.Remove("RoomLocation");
            Session.Remove("NearestLocation");
            Session.Remove("NoOfPerson");
            Session.Remove("RentPerHead");
            Session.Remove("Gender");
            Session.Remove("Date");
            Session.Remove("UploadPhoto1");
            Session.Remove("UploadPhoto2");
            Session.Remove("UploadPhoto3");
            Session.Remove("LightBill");
            Session.Remove("BathRoom");
            Session.Remove("HotWater");
            Session.Remove("Cooking");
            Session.Remove("Parking");
            Session.Remove("Wifi");
            Session.Remove("MoreAboutRoom");
            int n = SqlDeleteDetails.Delete();

            if (n == 1)
            {
                Response.Write("<script>alert('Add Deleted...')</script>");
                Server.Transfer("Panel.aspx");
            }
        }