protected void Page_Load(object sender, EventArgs e)
 {
     // This page is used to receive the file submitted by AceoffixCtrl.
     Aceoffix.FileRequest freq = new Aceoffix.FileRequest();
     freq.SaveToFile(Server.MapPath("doc/") + freq.FileName);
     freq.Close();
 }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
        if (Request["matinbai"] != null)
        {
            matinbai = double.Parse(Request["matinbai"].ToString());
        }

        obj                 = SetItem();
        matinbai            = Daltinbai.InsertT_Tinbai_WordOnline(obj);
        Session["matinbai"] = matinbai;
        Pathfolder          = Global.Pathfiledoc;
        if (freq.FileExtName == ".htm")
        {
            Filedoc = _user.UserID.ToString() + _user.UserName + matinbai.ToString() + "_" + Request["MaDoiTuong"].ToString() + ".htm";
        }
        else
        {
            Filedoc = _user.UserID.ToString() + _user.UserName + matinbai.ToString() + "_" + Request["MaDoiTuong"].ToString() + ".doc";
        }
        CreateFolderByUserName(Pathfolder);
        Filedoc = Server.MapPath("/" + Pathfolder + Filedoc);
        freq.SaveToFile(Filedoc);
        freq.Close();
        string filehtm     = _user.UserID.ToString() + _user.UserName + matinbai.ToString() + "_" + Request["MaDoiTuong"].ToString() + ".htm";
        string pathfilehtm = Server.MapPath("/" + Pathfolder + filehtm);

        Daltinbai.sp_updatenoidungtin(matinbai, ReadHtmlFile(pathfilehtm));
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     // This page is used to receive the file submitted by AceoffixCtrl.
     Aceoffix.FileRequest freq = new Aceoffix.FileRequest();
     freq.SaveToFile(Server.MapPath("../doc/") + freq.FileName);
     Label1.Text = freq.DocumentText;
     freq.ShowPage(500, 500);
     freq.Close();
 }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Aceoffix.FileRequest freq = new Aceoffix.FileRequest();
        string subject            = freq.GetFormField("FileSubject");
        string newFileName        = Insert(subject);

        freq.SaveToFile(Server.MapPath("doc/") + newFileName);
        freq.CustomSaveResult = "ok";
        freq.Close();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Aceoffix.FileRequest freq = new Aceoffix.FileRequest();
        freq.SaveToFile(Server.MapPath("doc/") + freq.FileName);


        if (Request.QueryString["id"] != null && Request.QueryString["id"].Trim().Length > 0) //Get the parameter
        {
            id = int.Parse(Request.QueryString["id"].Trim());
        }


        if (freq.GetFormField("userName") != null && freq.GetFormField("userName").Trim().Length > 0) //Get the form field
        {
            userName = freq.GetFormField("userName");
        }


        if (freq.GetFormField("age") != null && freq.GetFormField("age").Trim().Length > 0)
        {
            age = int.Parse(freq.GetFormField("age"));
        }


        if (freq.GetFormField("selSex") != null && freq.GetFormField("selSex").Trim().Length > 0)
        {
            sex = freq.GetFormField("selSex");
        }

        string          connstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|demo_param.mdb";
        OleDbConnection conn       = new OleDbConnection(connstring);

        conn.Open();

        string       strsql;
        OleDbCommand cmd = new OleDbCommand();

        cmd.Connection  = conn;
        cmd.CommandType = CommandType.Text;
        strsql          = "Update Users set UserName = '******', age = " + age + ",sex = '" + sex + "' where id = " + id;
        cmd.CommandText = strsql;
        cmd.ExecuteNonQuery();
        conn.Close();

        freq.ShowPage(300, 200);
        freq.Close();
    }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Aceoffix.FileRequest freq = new Aceoffix.FileRequest();
     freq.SaveToFile(Server.MapPath("doc/") + freq.FileName);
     freq.Close();
 }