protected void Button2_Click(object sender, EventArgs e) { db.Execute("update users set CANCEL_FROM_NEXT_PERIOD=1 where id_user="******"select NextPaymentDate from users where id_user="******"message"] = "Your subscription has been canceled and your VIP membership will expire on " + t.ToString("MM/dd/yyyy"); MyUtils.RefreshUserRow(); }
private static DataSet GetUsers(int index, string filter, out string sql) { //index = 1; DB_Helper db = new DB_Helper(); int id_user = (int)MyUtils.GetUserField("id_user"); //currently logged in user if (string.IsNullOrEmpty(filter)) { filter = db.ExecuteScalarString("select isnull(filter,'DEFAULT') from users where id_user="******"mainphoto_"); d.Tables[0].Columns.Add("online"); d.Tables[0].Columns.Add("button_switch"); foreach (DataRow r in d.Tables[0].Rows) { r["button_switch"] = GetButtonSwitch(r); r["mainphoto_"] = MyUtils.GetImageUrl(r, MyUtils.ImageSize.MEDIUM); r["online"] = MyUtils.IsOnline((int)r["id_user"]) ? "1" : "0";// ..GetImageUrl(r, MyUtils.ImageSize.MEDIUM); } d.Tables[0].Columns.Remove("mainphoto"); d.Tables[0].Columns["mainphoto_"].ColumnName = "MainPhoto"; d.Tables[0].TableName = "U"; DataTable t = new DataTable(); t.TableName = "filter"; t.Columns.Add("json"); t.Rows.Add(t.NewRow()); t.Rows[0]["json"] = f.ToString(); d.Tables.Add(t); return(d); }
private static DataSet GetUsers(int index, string filter, out string sql) { //index = 1; DB_Helper db = new DB_Helper(); int id_user = (int) MyUtils.GetUserField("id_user"); //currently logged in user if (string.IsNullOrEmpty(filter)) filter = db.ExecuteScalarString("select isnull(filter,'DEFAULT') from users where id_user="******"mainphoto_"); d.Tables[0].Columns.Add("online"); d.Tables[0].Columns.Add("button_switch"); foreach (DataRow r in d.Tables[0].Rows) { r["button_switch"] = GetButtonSwitch(r); r["mainphoto_"] = MyUtils.GetImageUrl(r, MyUtils.ImageSize.MEDIUM); r["online"] = MyUtils.IsOnline((int)r["id_user"]) ? "1" : "0";// ..GetImageUrl(r, MyUtils.ImageSize.MEDIUM); } d.Tables[0].Columns.Remove("mainphoto"); d.Tables[0].Columns["mainphoto_"].ColumnName = "MainPhoto"; d.Tables[0].TableName = "U"; DataTable t = new DataTable(); t.TableName = "filter"; t.Columns.Add("json"); t.Rows.Add(t.NewRow()); t.Rows[0]["json"] = f.ToString(); d.Tables.Add(t); return d; }