Esempio n. 1
0
 //파일사이즈알아내기
 protected string GetFileSize(object dfName)
 {
     JinsLibrary.FILE.FileLib fUtil = new JinsLibrary.FILE.FileLib();
     if (fUtil.FileExists(SystemConfig.GetValue("DocUploadDir") + dfName))
     {
         return(MathLib.GetFileSizeUnit(fUtil.Length).ToString());
     }
     else
     {
         return("-");
     }
 }
Esempio n. 2
0
        protected void rptPRFile_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "select")
            {
                //dlFiles.EditItemIndex = -1;
                //dlFiles.SelectedIndex = e.Item.ItemIndex;
                //BindDataList();
                Literal lit          = (Literal)e.Item.Parent.Parent.FindControl("df_id");
                string  df_id        = lit.Text;
                string  dfOrder      = ((System.Web.UI.WebControls.Image)e.Item.FindControl("imgExtIcon")).AlternateText;
                string  dfName       = e.CommandArgument.ToString();
                string  dfOriginName = ((LinkButton)e.Item.FindControl("dfOriginName")).Text;                // Text??

                //파일다운로드수 증가 -- 다운받은 후 증가해야 하는데.....
                dbUtil = new DBLib();
                dbUtil.ChangeFigure("t_DocFileAssets", "dfDLcount", 1, "df_id=" + df_id + " And dfOrder=" + dfOrder);
                dbUtil.SqlConnection.Close();

                //파일다운로드
                fUtil = new JinsLibrary.FILE.FileLib();
                fUtil.Open(SystemConfig.GetValue("DocUploadDir") + dfName);
                fUtil.DownLoad(dfOriginName);
            }
        }