Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            getImageLogo();
            lblLastUpdate.InnerHtml = "Last Update : " + Star.VersionControl.Versions.DateCreate.ToString("dd/MM/yyyy");
            lblVersion.InnerHtml    = Star.VersionControl.Versions.ProductName + " V. " + Star.VersionControl.Versions.ProductVersion;

            string   strSql = " Select * From Config ";
            DataView dv     = Conn.Select(strSql);                                                   // get วันที่ Update ล่าสุด เพื่อเช็คค่า

            TimeSpan ts = Convert.ToDateTime(dv[0]["LastUpdate"].ToString()).Subtract(DateTime.Now); // เทียบวันที่เท่ากัน //DateTime.ParseExact(dv[0]["LastUpdate"].ToString(), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).Subtract(DateTime.Now);
            if (ts.Days < 0)
            {
                if (Star.Product.ProductKey.ProductID == null)
                {
                    Star.Product.ProductKey.ProductID = Program.ProductID;
                }

                string UpdateLink = btc.SchoolFieldName("UpdateLink", "");
                Star.VersionControl.VersionHandler version = new Star.VersionControl.VersionHandler(UpdateLink);   //Url ที่ใช้ Download
                if (!version.IsLastVersion && version.LastVersion != null)
                {
                    Conn.Update("Config", "", "LastUpdate, Version", DateTime.Now, version.LastVersion);
                    //Page.Cache.Remove("CNFG");
                }
            }
        }
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string UpdateLink = btc.SchoolFieldName("UpdateLink", CurrentUser.SchoolID);

        Response.Write(UpdateLink);
        Response.Write("<br/>");
        Response.Write(Star.Product.ProductKey.ProductID);
    }
Exemple #3
0
 protected void btSave_Click(object sender, EventArgs e)
 {
     if (txtPassword.Text == "st@rs0ft")
     {
         tblMenu.Visible       = true;
         lblCkPassword.Visible = false;
         Link1.HRef            = btc.SchoolFieldName("LogSarLink", CurrentUser.SchoolID);
         Link2.HRef            = "../MasterData/ApproveAll.aspx";
         Link3.HRef            = "../Setting/MyAdmissionView.aspx";
         Link4.HRef            = "../MasterData/SarConfig.aspx";
         Link5.HRef            = "../MasterData/ClearAll.aspx";
         Link6.HRef            = "../MasterData/ClearUser.aspx";
         Link7.HRef            = "../MasterData/ClearIndicatorsError.aspx";
     }
     else
     {
         tblMenu.Visible       = false;
         lblCkPassword.Visible = true;
     }
 }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Star.Product.ProductKey.ProductID == null)
        {
            Star.Product.ProductKey.ProductID = Program.ProductID;
        }

        Star.Web.LicenseControl.LicenseHandler license = new Star.Web.LicenseControl.LicenseHandler();
        pnlLicense.InnerHtml = license.ProcessRequestHtml(this.Context);
        Program.Settings     = null;

        string UpdateLink = btc.SchoolFieldName("UpdateLink", CurrentUser.SchoolID);

        Star.VersionControl.VersionHandler version = new Star.VersionControl.VersionHandler(UpdateLink);
        version.RenderVersionToControl(AutoUpdate, "ระบบกำลังดำเนินการ<br/>ห้ามปิดหน้าจอนี้จนกว่าจะดำเนินการเสร็จ");

        Connection Conn = new Connection();

        Conn.Update("Config", "", "Version", "");
    }