Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.Flag   = base.Request.QueryString["Flag"].ToString();
         this.OpType = base.Request.QueryString["OpType"].ToString();
         if (this.Flag == "Q")
         {
             this.LbName.Text = "质量台账模板维护";
         }
         else
         {
             if (this.Flag == "S")
             {
                 this.LbName.Text = "安全资料模板维护";
             }
         }
         if (this.OpType == "Edit")
         {
             this.tami               = this.taa.getOneAccountModel(Convert.ToInt32(base.Request.QueryString["RID"]));
             this.tbModelName.Text   = this.tami.ModelName.ToString();
             this.FileModel.Visible  = false;
             this.hlFile.Visible     = true;
             this.hlFile.Text        = this.tami.FilePath.Substring(this.tami.FilePath.LastIndexOf("/") + 1);
             this.hlFile.NavigateUrl = this.tami.FilePath.ToString();
         }
     }
 }
Esempio n. 2
0
        public TableAccountModelInfo getOneAccountModel(int Id)
        {
            DataTable             table = publicDbOpClass.DataTableQuary("select * from Ent_Quality_Model where id = " + Id);
            TableAccountModelInfo info  = new TableAccountModelInfo();

            if (table.Rows.Count > 0)
            {
                info.ID        = Convert.ToInt32(table.Rows[0]["id"]);
                info.ModelName = table.Rows[0]["ModelName"].ToString();
                info.FilePath  = table.Rows[0]["FilePath"].ToString();
                info.Flag      = table.Rows[0]["Flag"].ToString();
            }
            return(info);
        }