protected void rptData_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandArgument != null)
        {
            Int64 ClientIDP = Int64.Parse(e.CommandArgument.ToString());
            switch (e.CommandName)
            {
            case "cEdit":
                hfID.Value = ClientIDP.ToString();
                DataTable dtGetStaff = ClientClass.GetClient_ByClientID(ClientIDP);
                if (dtGetStaff.Rows.Count > 0)
                {
                    DataRow dr = dtGetStaff.Rows[0];

                    tbFirstName.Text = dr["FirstName"].ToString();
                    tbLastName.Text  = dr["LastName"].ToString();
                    tbIMEINo.Text    = dr["IMEINo"].ToString();

                    tbEmailID.Text = dr["EmailID"].ToString();

                    ddlState.SelectedValue = (dr["StateIDF"].ToString() == "0" ? "-1" : dr["StateIDF"].ToString());

                    Int64 mStateIDF = 0;
                    Int64.TryParse(dr["StateIDF"].ToString(), out mStateIDF);
                    if (mStateIDF > 0)
                    {
                        BindCity(mStateIDF);
                    }

                    ddlCity.SelectedValue = (dr["CityIDF"].ToString() == "0" ? "-1" : dr["CityIDF"].ToString());

                    tbAddress.Text  = dr["Address"].ToString();
                    tbMobileNo.Text = dr["MobileNo"].ToString();
                    tbUserName.Text = dr["UserName"].ToString();
                    tbPassword.Text = dr["Password"].ToString();

                    cbIsActive.Checked = bool.Parse(dr["IsActive"].ToString());

                    pnC.Visible      = true;
                    pnG.Visible      = false;
                    btAddNew.Visible = false;
                }
                break;

            case "cDelete":
                MEMBERS.SQLReturnValue mRes = ClientClass.DeleteClient_ByClientID(ClientIDP);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "noti", "setMessage('<b>" + mRes.MessageFromSQL + "</b>',1);", true);
                ClearControls();
                BindData();
                break;
            }
        }
    }
    public void BindData()
    {
        Int64 ClientIDP = 0;

        Int64.TryParse(MyLogic.GetUserID, out ClientIDP);

        hfID.Value = ClientIDP.ToString();
        DataTable dtGetStaff = ClientClass.GetClient_ByClientID(ClientIDP);

        if (dtGetStaff.Rows.Count > 0)
        {
            DataRow dr = dtGetStaff.Rows[0];

            tbFirstName.Text = dr["FirstName"].ToString();
            tbLastName.Text  = dr["LastName"].ToString();
            tbIMEINo.Text    = dr["IMEINo"].ToString();

            tbEmailID.Text = dr["EmailID"].ToString();

            ddlState.SelectedValue = (dr["StateIDF"].ToString() == "0" ? "-1" : dr["StateIDF"].ToString());

            Int64 mStateIDF = 0;
            Int64.TryParse(dr["StateIDF"].ToString(), out mStateIDF);
            if (mStateIDF > 0)
            {
                BindCity(mStateIDF);
            }

            ddlCity.SelectedValue = (dr["CityIDF"].ToString() == "0" ? "-1" : dr["CityIDF"].ToString());

            tbAddress.Text  = dr["Address"].ToString();
            tbMobileNo.Text = dr["MobileNo"].ToString();
            tbUserName.Text = dr["UserName"].ToString();
            tbPassword.Text = dr["Password"].ToString();
        }
    }