protected void Page_Load(object sender, EventArgs e) { if (Session["LANG"] == null) { Session["LANG"] = "EN"; } if (!IsPostBack) { load_info(); } if (AuthCookieParse.UserStatus() == "0") { Loginlbl.Text = AuthCookieParse.UserFIO(); } else if (AuthCookieParse.UserStatus() == "1") { Loginlbl.Text = AuthCookieParse.UserFIO() + " (Operator)"; } else if (AuthCookieParse.UserStatus() == "2") { Loginlbl.Text = AuthCookieParse.UserFIO() + " (Admin)"; } else if (AuthCookieParse.UserStatus() == "3") { Loginlbl.Text = AuthCookieParse.UserFIO() + " (SuperAdmin)"; } Loginlbl.Text = " " + Loginlbl.Text; }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["qeydiyyat12_1"].ToString() != "ok") { Response.Redirect("Default.aspx"); } } catch (Exception) { Response.Redirect("Default.aspx"); } SqlDataSource1.ConnectionString = ConfigurationManager.ConnectionStrings["DBPath"].ConnectionString; SqlDataSource1.SelectCommand = @" SELECT C.ID,C.NAME,C.SURNAME,C.PHONE_NUMBER,GENDER,U.NAME AS 'USER_ID', CASE SOURCE_TYPE WHEN 1 THEN (SELECT CS.NAME FROM COSTUMER_SOURCE CS WHERE CS.ID=SOURCE_TYPE_NAME) WHEN 2 THEN (SELECT BP.NAME FROM BUSINESS_PARTNERS BP WHERE BP.ID=SOURCE_TYPE_NAME) END AS SOURCE_NAME, CASE AGE_INTERVAL WHEN 1 THEN '10-18' WHEN 2 THEN '18-25' WHEN 3 THEN '25-40' END AS AGES, CASE SOURCE_TYPE WHEN 1 THEN 'Küçe' WHEN 2 THEN 'Biznes' END AS SOURCE_T FROM CLIENTS C left JOIN USERS U ON C.USER_ID=U.ID" ; source_type_sql.ConnectionString = ConfigurationManager.ConnectionStrings["DBPath"].ConnectionString; source_type_sql.SelectCommand = @"SELECT ID,NAME FROM COSTUMER_SOURCE ORDER BY ID"; if (!IsPostBack) { birthday_txt.Text = Convert.ToDateTime(DateTime.Now).Date.ToString("yyyy-MM-dd"); User_txt.Text = AuthCookieParse.UserFIO(); } }