Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            UDT = UAdapter.Select_By_UID(Convert.ToInt32(Session["uid"].ToString()));
            HDT = HAdapter.Select_By_SNAME_BLOCKNO(UDT.Rows[0]["societyname"].ToString(), Convert.ToInt32(UDT.Rows[0]["Houseid"].ToString()));

            Image3.ImageUrl      = HDT.Rows[0]["image"].ToString();
            lblsname.Text        = HDT.Rows[0]["sname"].ToString();
            lblbno.Text          = HDT.Rows[0]["blockno"].ToString();
            lbltype.Text         = HDT.Rows[0]["type"].ToString();
            ViewState["HID"]     = HDT.Rows[0]["HID"].ToString();
            SellDT               = SellAdapter.Select_By_UID(Convert.ToInt32(Session["uid"].ToString()));
            GridView2.DataSource = SellDT;
            GridView2.DataBind();
            if (SellDT.Rows.Count == 1)
            {
                lblrent.Text = SellDT.Rows[0]["sell"].ToString();
            }
            else
            {
                lblrent.Text = "--";
            }
        }
    }
 protected void Button1_Click(object sender, EventArgs e)
 {
     UDT = UAdapter.select_email(txtemail.Text);
     if (UDT.Rows.Count > 0)
     {
         lblmsg.Text = "Email alredy exist";
     }
     else
     {
         string gnd = "";
         if (rdofemale.Checked == true)
         {
             gnd = "Male";
         }
         else
         {
             gnd = "Female";
         }
         UAdapter.Insert(txtfname.Text, txtlname.Text, txtmobile.Text, gnd, txtadd.Text, txtcity.Text, txtpincode.Text, txtemail.Text, txtpass.Text);
         lblmsg.Text = "Registration Successfully";
         if (lblmsg.Text == "Registration Successfully")
         {
             txtfname.Text       = "";
             txtlname.Text       = "";
             txtmobile.Text      = "";
             txtadd.Text         = "";
             txtcity.Text        = "";
             txtpincode.Text     = "";
             txtemail.Text       = "";
             txtpass.Text        = "";
             txtconfirmpass.Text = "";
         }
     }
 }
Esempio n. 3
0
 protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     GridView1.PageIndex = e.NewSelectedIndex;
     UDT = UAdapter.Select_By_SNAM(drpsociety.SelectedItem.Text);
     GridView1.DataSource = UDT;
     GridView1.DataBind();
 }
Esempio n. 4
0
    protected void Button8_Click(object sender, EventArgs e)
    {
        UDT = UAdapter.Select_By_SNAM(drpsociety.SelectedItem.Text);
        GridView1.DataSource = UDT;
        GridView1.DataBind();

        lblmsg.Text = GridView1.Rows.Count + " - Record Found";
    }
Esempio n. 5
0
 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     UAdapter.Delete(Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value));
     lblmsg.Text          = "Member Deleted Successfully";
     UDT                  = UAdapter.Select_By_SNAM(drpsociety.SelectedItem.Text);
     GridView1.DataSource = UDT;
     GridView1.DataBind();
 }
 protected void btnedit_Click(object sender, EventArgs e)
 {
     MultiView1.ActiveViewIndex = 1;
     UDT            = UAdapter.Select_By_UID(Convert.ToInt32(Session["uid"].ToString()));
     txtfname.Text  = UDT.Rows[0]["fname"].ToString();
     txtlname.Text  = UDT.Rows[0]["lname"].ToString();
     txtemail.Text  = UDT.Rows[0]["email"].ToString();
     txtmobile.Text = UDT.Rows[0]["mobile"].ToString();
 }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.IsPostBack == false)
     {
         UDT = UAdapter.SELECT();
         GridView2.DataSource = UDT;
         GridView2.DataBind();
         lbl.Text = GridView2.Rows.Count.ToString();
     }
 }
Esempio n. 8
0
 protected void btnsearch_Click(object sender, EventArgs e)
 {
     lbladd.Text            = "";
     lblmsg.Text            = "";
     UDT                    = UAdapter.Seelctearch(Session["email"].ToString(), txtsearch.Text + "%");
     chkfrnd.DataSource     = UDT;
     chkfrnd.DataTextField  = "Email";
     chkfrnd.DataValueField = "UID";
     chkfrnd.DataBind();
     lblmsg.Text = UDT.Rows.Count + " - Record Found.";
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        lblsell.Text = "";
        UDT          = UAdapter.Select_By_UID(Convert.ToInt32(Session["uid"].ToString()));
        HDT          = HAdapter.Select_By_SNAME_BLOCKNO(UDT.Rows[0]["societyname"].ToString(), Convert.ToInt32(UDT.Rows[0]["Houseid"].ToString()));

        Image3.ImageUrl  = HDT.Rows[0]["image"].ToString();
        lblsname.Text    = HDT.Rows[0]["sname"].ToString();
        lblbno.Text      = HDT.Rows[0]["blockno"].ToString();
        lbltype.Text     = HDT.Rows[0]["type"].ToString();
        ViewState["HID"] = HDT.Rows[0]["HID"].ToString();
    }
Esempio n. 10
0
 protected void btnlogin_Click(object sender, EventArgs e)
 {
     UDT = UAdapter.select_forgot_password(txtusername.Text, txtmobile.Text);
     if (UDT.Rows.Count > 0)
     {
         lblmsg.Text = "Password ="******"password"].ToString();
     }
     else
     {
         lblmsg.Text = "Invalid name or mobile";
     }
 }
 protected void btnupdate_Click(object sender, EventArgs e)
 {
     MultiView1.ActiveViewIndex = 0;
     UAdapter.Update(txtfname.Text, txtlname.Text, txtemail.Text, txtmobile.Text, Convert.ToDateTime(ViewState["bd"].ToString()), Convert.ToInt32(Session["uid"].ToString()));
     UDT             = UAdapter.Select_By_UID(Convert.ToInt32(Session["uid"].ToString()));
     lblfname.Text   = UDT.Rows[0]["fname"].ToString();
     lbllname.Text   = UDT.Rows[0]["lname"].ToString();
     lblemail.Text   = UDT.Rows[0]["email"].ToString();
     lblmobile.Text  = UDT.Rows[0]["mobile"].ToString();
     lblsname.Text   = UDT.Rows[0]["societyname"].ToString();
     lblmember.Text  = UDT.Rows[0]["member"].ToString();
     ViewState["bd"] = UDT.Rows[0]["Bdate"].ToString();
 }
Esempio n. 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.IsPostBack == false)
     {
         UDT = UAdapter.SELECT();
         drpemail.DataSource     = UDT;
         drpemail.DataTextField  = "email";
         drpemail.DataValueField = "uid";
         drpemail.DataBind();
         drpemail.Items.Insert(0, "SELECT");
     }
     lbl.Text = "";
 }
Esempio n. 13
0
 protected void btnpss_Click(object sender, EventArgs e)
 {
     UDT = UAdapter.Select_By_Email_Mobile(txtuser.Text, txtmobile.Text);
     if (UDT.Rows.Count == 1)
     {
         lbl.Text       = "Password = "******"password"].ToString();
         txtmobile.Text = "";
         txtuser.Text   = "";
     }
     else
     {
         lbl.Text = "Invalid email or  mobile";
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     MultiView1.ActiveViewIndex = 0;
     if (Page.IsPostBack == false)
     {
         UDT             = UAdapter.Select_By_UID(Convert.ToInt32(Session["uid"].ToString()));
         lblfname.Text   = UDT.Rows[0]["fname"].ToString();
         lbllname.Text   = UDT.Rows[0]["lname"].ToString();
         lblemail.Text   = UDT.Rows[0]["email"].ToString();
         lblmobile.Text  = UDT.Rows[0]["mobile"].ToString();
         lblsname.Text   = UDT.Rows[0]["societyname"].ToString();
         lblmember.Text  = UDT.Rows[0]["member"].ToString();
         ViewState["bd"] = UDT.Rows[0]["Bdate"].ToString();
     }
 }
Esempio n. 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            UDT = UAdapter.selectforDisplay(Convert.ToInt32(Session["uid"].ToString()), Session["email"].ToString());
            chkfrnd.DataSource     = UDT;
            chkfrnd.DataTextField  = "Email";
            chkfrnd.DataValueField = "UID";
            chkfrnd.DataBind();

            CDT = CAdapter.selectbyemail(Session["email"].ToString());
            GvFrind.DataSource = CDT;
            GvFrind.DataBind();
        }
    }
Esempio n. 16
0
 protected void btnlogin_Click(object sender, EventArgs e)
 {
     UDT = UAdapter.select_login(txtusername.Text, txtpassword.Text);
     if (UDT.Rows.Count > 0)
     {
         Session["email"] = UDT.Rows[0]["email"].ToString();
         Session["name"]  = UDT.Rows[0]["fname"].ToString() + " " + UDT.Rows[0]["lname"].ToString();
         Session["uid"]   = UDT.Rows[0]["uid"].ToString();
         Response.Redirect("Home.aspx");
     }
     else
     {
         lblmsg.Text = "Invalid username or password";
     }
 }
Esempio n. 17
0
 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     UDT = UAdapter.Select_BY_HID(Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value));
     if (UDT.Rows.Count > 0)
     {
         lblmsg.Text = "Please, Delete first member of this house";
     }
     else
     {
         HAdapter.Delete(Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value));
         HDT = HAdapter.Select_BY_SNAME(drpsocietyy.SelectedItem.Text);
         GridView1.DataSource = HDT;
         GridView1.DataBind();
         lblmsg.Text = "House Deleted Successsfully";
     }
 }
 protected void btnlogin_Click(object sender, EventArgs e)
 {
     UDT = UAdapter.Select_Login(txtuname.Text, txtupass.Text);
     if (UDT.Rows.Count > 0)
     {
         Session["uid"]   = UDT.Rows[0]["UID"].ToString();
         Session["uname"] = txtuname.Text;
         Session["upass"] = txtupass.Text;
         Session["fname"] = UDT.Rows[0]["fname"].ToString();
         Session["email"] = UDT.Rows[0]["email"].ToString();
         Response.Redirect("LHome.aspx");
     }
     else
     {
         lbllogin.Text = "Invalid User !!";
     }
 }
Esempio n. 19
0
    protected void GvFrind_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int de = CAdapter.Delete(Convert.ToInt32(GvFrind.DataKeys[e.RowIndex].Value));

        CDT = CAdapter.selectbyemail(Session["email"].ToString());
        GvFrind.DataSource = CDT;
        GvFrind.DataBind();

        UDT = UAdapter.selectforDisplay(Convert.ToInt32(Session["uid"].ToString()), Session["email"].ToString());
        chkfrnd.DataSource     = UDT;
        chkfrnd.DataTextField  = "Email";
        chkfrnd.DataValueField = "UID";
        chkfrnd.DataBind();

        lbladd.Text      = "Contact Removed Successfully !!";
        lbladd.ForeColor = System.Drawing.Color.Red;
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["uid"] == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         UDT             = UAdapter.Select_By_UID(Convert.ToInt32(Session["uid"].ToString()));
         Image2.ImageUrl = UDT.Rows[0]["image"].ToString();
         lblname.Text    = Session["fname"].ToString();
         if (Page.IsPostBack == false)
         {
             SDT = SAdapter.SelectTOP10();
             GridView1.DataSource = SDT;
             GridView1.DataBind();
         }
     }
 }
    protected void btnlogin_Click(object sender, EventArgs e)
    {
        lblerror.Text = "";

        UDT = UAdapter.SelectForLOGIN(txtuname.Text, txtupass.Text);

        if (UDT.Rows.Count > 0)
        {
            Session["uid"]      = UDT.Rows[0]["uid"].ToString();
            Session["email"]    = UDT.Rows[0]["email"].ToString();
            Session["password"] = UDT.Rows[0]["password"].ToString();
            Session["name"]     = UDT.Rows[0]["fname"].ToString();
            Session["img"]      = UDT.Rows[0]["image"].ToString();
            Response.Redirect("Inbox.aspx");
        }
        else
        {
            lblerror.Text = "Invalid email or password";
        }
    }
Esempio n. 22
0
    protected void btnadd_Click(object sender, EventArgs e)
    {
        lbladd.ForeColor = System.Drawing.Color.Blue;
        lbladd.Text      = "";
        lblmsg.Text      = "";
        for (int i = 0; i < chkfrnd.Items.Count; i++)
        {
            if (chkfrnd.Items[i].Selected == true)
            {
                int ist = CAdapter.Insert(Session["email"].ToString(), chkfrnd.Items[i].Text, System.DateTime.Now.Date);
                lbladd.Text = "Contact Added Successfully!!'";
            }
        }

        CDT = CAdapter.selectbyemail(Session["email"].ToString());
        GvFrind.DataSource = CDT;
        GvFrind.DataBind();

        UDT = UAdapter.selectforDisplay(Convert.ToInt32(Session["uid"].ToString()), Session["email"].ToString());
        chkfrnd.DataSource     = UDT;
        chkfrnd.DataTextField  = "Email";
        chkfrnd.DataValueField = "UID";
        chkfrnd.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            UDT             = UAdapter.USERMST_SELECTBYID(Convert.ToInt32(Session["UID"].ToString()));
            txtfname1.Text  = UDT.Rows[0]["Fname"].ToString();
            txtsname1.Text  = UDT.Rows[0]["Lname"].ToString();
            txtmobile1.Text = UDT.Rows[0]["Mobile"].ToString();
            txtcity1.Text   = UDT.Rows[0]["City"].ToString();
            txtpin1.Text    = UDT.Rows[0]["Pincode"].ToString();
            txtadd1.Text    = UDT.Rows[0]["Address"].ToString();
            DateTime bdate  = Convert.ToDateTime(UDT.Rows[0]["Dateofbirth"].ToString());
            DateTime bmonth = Convert.ToDateTime(UDT.Rows[0]["Dateofbirth"].ToString());
            DateTime byear  = Convert.ToDateTime(UDT.Rows[0]["Dateofbirth"].ToString());

            drpdd1.Text = bdate.Date.Day.ToString();

            //drpmm1.Text = bmonth.Month.ToString();
            if (bmonth.Month.ToString() == "1")
            {
                drpmm1.Text = "jan";
            }
            else if (bmonth.Month.ToString() == "2")
            {
                drpmm1.Text = "feb";
            }
            else if (bmonth.Month.ToString() == "3")
            {
                drpmm1.Text = "march";
            }
            else if (bmonth.Month.ToString() == "4")
            {
                drpmm1.Text = "april";
            }
            else if (bmonth.Month.ToString() == "5")
            {
                drpmm1.Text = "may";
            }
            else if (bmonth.Month.ToString() == "6")
            {
                drpmm1.Text = "jun";
            }
            else if (bmonth.Month.ToString() == "7")
            {
                drpmm1.Text = "july";
            }
            else if (bmonth.Month.ToString() == "8")
            {
                drpmm1.Text = "aug";
            }
            else if (bmonth.Month.ToString() == "9")
            {
                drpmm1.Text = "sep";
            }
            else if (bmonth.Month.ToString() == "10")
            {
                drpmm1.Text = "oct";
            }
            else if (bmonth.Month.ToString() == "11")
            {
                drpmm1.Text = "nov";
            }
            else if (bmonth.Month.ToString() == "12")
            {
                drpmm1.Text = "dec";
            }


            drpyyy1.Text = byear.Date.Year.ToString();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        lblerror.Text = "";
        UDT           = UAdapter.SelectForEmailCheck(txtuname.Text + "@yahoo.com");

        if (DrpDD.SelectedIndex == 0)
        {
            lblerror.Text = "Slect Date first";
        }
        else if (Drpmm.SelectedIndex == 0)
        {
            lblerror.Text = "Select Month first";
        }
        else if (Drpyyy.SelectedIndex == 0)
        {
            lblerror.Text = "select Year first";
        }
        else if (txtuname.Text == "")
        {
            lblerror.Text = "Enter UserName ";
        }
        else if (txtpass.Text == "")
        {
            lblerror.Text = "Enter Password";
        }
        else
        {
            if (UDT.Rows.Count == 1)
            {
                lblerror.Text = "Email already exist !!";
            }
            else
            {
                string img = "";
                if (RadioButton1.Checked == true)
                {
                    img = "~/img/boy.jpeg";
                }
                else
                {
                    img = "~/img/girl.jpeg";
                }


                if (txtpass.Text.Length > 8)
                {
                    if (UDT.Rows.Count > 0)
                    {
                        lblerror.Text = "UserName Already Exist";
                    }
                    else
                    {
                        int inst = UAdapter.Insert(txtfname.Text, txtsname.Text, Convert.ToDateTime(DrpDD.SelectedItem.Text + " " + Drpmm.SelectedItem.Text + " " + Drpyyy.SelectedItem.Text), txtadd.Text, txtcity.Text, txtpin.Text, txtmo.Text, txtuname.Text + txtuname0.Text, txtpass.Text, img);
                        Response.Redirect("Default.aspx");
                    }
                }
                else
                {
                    lblerror.Text = "Password more then 8 char";
                }
            }
        }
    }