예제 #1
0
 /// <summary>
 /// չʾ����
 /// </summary>
 /// <param name="id">��¼Id</param>
 private void ShowInfo(int id)
 {
     SFileBB fileBB = new SFileBB();
     LMessageBB messageBB = new LMessageBB();
     vLMessageData model = new vLMessageData();
     try
     {
         model = messageBB.GetVModel(id);
         this.title.Text = model.title;
         this.content.Text = model.content;
         this.fileId.Text = fileBB.GetDownBatchFileNm(model.fileId);
         this.sort.Text = model.sortNm;
         this.author.Text = model.author;
     }
     finally
     {
         fileBB.Dispose();
         messageBB.Dispose();
     }
     //�����Ѷ��˴�
     SCommBB commBB = new SCommBB();
     try
     {
         string strSql = "select count(distinct empId) from LMessageReaded where messageId=" + id.ToString();
         this.readedEmpCount.Text = commBB.ExecuteScalar(strSql).ToString();
     }
     finally
     {
         commBB.Dispose();
     }
 }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (null != Request.Params["id"])
        {
            int fileId = Convert.ToInt32(Request.Params["id"]);
            SFileBB fileBB = new SFileBB();
            SFileData fileData = new SFileData();
            try
            {
                fileData = fileBB.GetModel(fileId);
                if (fileData == null)
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "close", "alert('文件不存在,可能已被删除!');window.close();", true);
                    return;
                }
                string pathName = fileData.absolutPath + fileData.sysFileNm;

                FileInfo file = new FileInfo(pathName);
                if (file.Exists)
                {
                    this.OutPutFile(pathName, fileData.preFileNm);
                    this.ClientScript.RegisterStartupScript(this.GetType(), "close", "window.close();", true);
                }
                else
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "close", "alert('文件不存在,可能已被删除!');window.close();", true);
                }
            }
            catch (Exception ex)
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",1);", true);
                return;
            }
            finally
            {
                fileBB.Dispose();
            }
        }
    }
예제 #3
0
 /// <summary>
 /// չʾ����
 /// </summary>
 /// <param name="id">��¼Id</param>
 private void ShowInfo(int id)
 {
     SFileBB fileBB = new SFileBB();
     LMessageBB messageBB = new LMessageBB();
     LMessageData model = new LMessageData();
     try
     {
         model = messageBB.GetModel(id);
         this.title.Text = model.title;
         this.content.Value = model.content;
         this.fileId.Value = model.fileId;
         this.fileNm.Text = fileBB.GetBatchFileNm(model.fileId);
         if (this.sort.Items.FindByValue(model.sort.ToString()) != null)
         {
             this.sort.SelectedValue = model.sort.ToString();
         }
         this.author.Text = model.author;
         this.isIndexShow.Checked = model.isIndexShow;
     }
     finally
     {
         fileBB.Dispose();
         messageBB.Dispose();
     }
 }
예제 #4
0
    /// <summary>
    /// 展示数据
    /// </summary>
    /// <param name="id">记录Id</param>
    private void ShowInfo(int id)
    {
        LCustTagBB custTagBB = new LCustTagBB();
        vLCustTagData model = new vLCustTagData();
        SFileBB fileBB = new SFileBB();

        try
        {
            model = custTagBB.GetVModel(id);

            this.hidCustNo.Value = model.custNo;
            this.hidMaterialNo.Value = model.materialNo;
            this.bigSQL.Text = model.bigTagSql;
            this.smallSQL.Text = model.smallTagSql;
            SFileData smdtata = fileBB.GetModel(model.smallTagFileId);

            if (smdtata != null)
            {
                this.smallfileNm.InnerHtml = "<a href='" + smdtata.absolutPath + smdtata.preFileNm + "' >" + smdtata.preFileNm + "</a>";
            }

            SFileData bgdata = fileBB.GetModel(model.bigTagFileId);

            if (bgdata != null)
            {
                this.bigfileNm.InnerHtml = "<a href='" + bgdata.absolutPath + bgdata.preFileNm + "' >" + bgdata.preFileNm + "</a>";
            }

            this.custNm.Text = model.custNm;
            this.materialNm.Text = model.materialDesc;
            this.bigTagFileId.Value = model.bigTagFileId.ToString();
            this.smallTagFileId.Value = model.smallTagFileId.ToString();
            this.tbEachPrintBigTagNum.Text = model.eachPrintBigTagNum.ToString();
            this.tbEachPrintSmallTagNum.Text = model.eachPrintSmallTagNum.ToString();
            this.tbUnit.Text = model.unit;
            this.tbUnits.Text = model.units;
        }
        finally
        {
            custTagBB.Dispose();
            fileBB.Dispose();
        }
    }
예제 #5
0
 /// <summary>
 /// 展示数据
 /// </summary>
 /// <param name="id">记录Id</param>
 private void ShowInfo(int id)
 {
     LCheckDetailBB checkDetailBB = new LCheckDetailBB();
     vLCheckDetailData model = new vLCheckDetailData();
     SFileBB fileBB = new SFileBB();
     try
     {
         model = checkDetailBB.GetVModel(id);
         this.materialNo.Text = model.materialNo;
         this.materialDesc.Text = model.materialDesc;
         this.checkDetailDesc.Text = model.checkDetailDesc;
         this.checkItemId.SelectedValue = model.checkItemId.ToString();
         this.dateType.SelectedValue = model.dateType;
         this.unit.Text = model.unit;
         this.uplimit.Text = model.uplimit;
         this.downlimit.Text = model.downlimit;
         this.standDesc.Text = model.standDesc;
         if (model.isMustCheck != null)
         {
             this.isMustCheck.Checked = model.isMustCheck;
         }
         if (model.isAddupCheck != null)
         {
             this.isAddupCheck.Checked = model.isAddupCheck;
         }
         this.checkAmount.Text = model.checkAmount.ToString();
         this.openBoxScale.Text = Convert.ToString(model.openBoxScale * 100);
         this.checkOutScale.Text = Convert.ToString(model.checkOutScale * 100);
         this.mark.Text = model.mark;
         if (model.checkFileId != 0)
         {
             this.fileId.Value = Convert.ToString(model.checkFileId);
             this.fileNm.Value = fileBB.GetBatchFileNm(Convert.ToString(model.checkFileId));
             this.localeImage.ImageUrl = "../../../Common/Image.ashx?ImID=" + Convert.ToString(model.checkFileId);
         }
         //else
         //{
         //    this.fileId.Value = model.checkFileId.ToString();
         //    this.fileNm =
         //}
     }
     finally
     {
         checkDetailBB.Dispose();
         fileBB.Dispose();
     }
 }
예제 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         this.BindCheckItemList();//绑定检测大类
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             this.IdValue = Convert.ToInt32(Request.Params["id"]);
         }
         if (Request.Params["state"] != null && Request.Params["state"].Trim() != string.Empty)
         {
             this.State = Request.Params["state"].ToString();
             switch (this.State)
             {
                 case "1":   //add
                     this.fileId.Value = "0";
                     this.fileNm.Value = "0";
                     break;
                 case "2":   //update
                     this.ShowInfo(this.IdValue);
                     break;
                 default:
                     break;
             }
         }
     }
     //页面刷新展示图片
     using (SFileBB fileBB = new SFileBB())
     {
         if (this.fileId.Value != "")
         {
             this.fileNm.Value = fileBB.GetBatchFileNm(Convert.ToString(this.fileId.Value));
             this.localeImage.ImageUrl = "../../../Common/Image.ashx?ImID=" + Convert.ToString(this.fileId.Value);
         }
     }
 }