示例#1
0
    protected void ButEdit_Click1(object sender, EventArgs e)
    {
        int intReturnValue = CCustomerMasterServices.CustomerMasterUpdate(Convert.ToInt32(LblcustomerId.Text),
                                                                          Txtfirstname.Text,
                                                                          TxtLastName.Text,
                                                                          TxtAddress.Text,
                                                                          TxtCity.Text,
                                                                          Convert.ToInt32(TxtPincode.Text),
                                                                          TxtState.Text,
                                                                          TxtPhoneno.Text,
                                                                          Convert.ToDateTime(TxtBirthDate.Text));

        //  int intReturnValue = CCustomerMasterServices.CustomerMasterUpdate(1, "ami", "patel", "surat", "tina", 122, "surat",199,Convert.ToDateTime(TxtBirthDate.Text));

        if (intReturnValue > 0)
        {
            Txtfirstname.Text = "";
            TxtLastName.Text  = "";
            TxtAddress.Text   = "";
            TxtCity.Text      = "";
            TxtState.Text     = "";
            TxtPhoneno.Text   = "";
            TxtPincode.Text   = "";
        }
    }
    public void BindgvCustomerList()
    {
        DataSet dsCustomerMasterList = CCustomerMasterServices.CustomerMasterList();

        GvCustomer.DataSource = dsCustomerMasterList;
        GvCustomer.DataBind();
    }
示例#3
0
    public void BindCustomerCityList()
    {
        DataSet dsCityMasterList = CCustomerMasterServices.BindCityList();

        DropCityList.DataSource     = dsCityMasterList;
        DropCityList.DataTextField  = "Cityname";
        DropCityList.DataValueField = "CityId";
        DropCityList.DataBind();
    }
示例#4
0
    //protected void captacha_Sucess(object sender, EventArgs e)
    //{

    //}
    //protected void Captacha_Failure(object sender, EventArgs e)
    //{

    //}
    protected void ButCreatemyaccount_Click(object sender, EventArgs e)
    {
        if (Session["captcha"] != null && captcha1.txtCaptchaBox.Text.ToLower() == Session["captcha"].ToString())
        {
            Lblmsgbox.Text = "sucess";
            //on correct code create account
            // ButCreatemyaccount .Visible = true;
            ButCancel.Visible = true;
            //ButUpdate.Visible = false;
            //ButAdd.Visible = true;
            // TblAddEdit.Visible = true;

            int intReturnValue = CCustomerMasterServices.CustomerMasterInsert(
                Txtfirstname.Text,
                TxtLastName.Text,
                TxtAddress.Text,
                Convert.ToInt32(DropCityList.SelectedValue),
                Convert.ToInt32(Dropstate.SelectedValue),
                // LblState.Text,
                Convert.ToInt32(TxtPincode.Text),
                TxtPhoneno.Text,
                Convert.ToDateTime(TxtBirthDate.Text),
                TxtEmailId.Text,
                TxtPassword.Text,
                checkStatus.Checked = true, Lbltype.Text);

            if (intReturnValue > 0)
            {
                Lblmsgbox.Text = " Account is Created";
                // BindCustomerList();
                Txtfirstname.Text = "";
                TxtLastName.Text  = "";
                TxtAddress.Text   = "";
                //TxtCity.Text = "";
                TxtPincode.Text = "";
                // LblState.Text = "";
                TxtPhoneno.Text         = "";
                TxtEmailId.Text         = "";
                TxtPassword.Text        = "";
                TxtConfirmPassword.Text = "";
                //TxtDate.Text = "";
                checkStatus.Checked = false;
            }
            //else
            {
            }
        }
        else
        {
            Lblmsgbox.Text = "You have entered incorrect code, Please enter correct one.";
            captcha1.txtCaptchaBox.Text = "";
            captcha1.SetCaptcha();
            //SetCaptcha();
        }
    }