// protected void Gv_DataBind(LabMS.Model.Attachment attach) { if (attach.Attach_Name == "") { string type=""; if (!string.IsNullOrEmpty(Request.QueryString["Type"])) { if (IsNumber(Request.QueryString["Type"])) { type = Request.QueryString["Type"].Trim(); } } else { type = ""; } LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); if (type != "") { ls = AttachItem.GetModelList("Attach_ID=" + attach.ID + " and Item_Type=" + type); } else { ls = AttachItem.GetModelList("Attach_ID=" + attach.ID); } Gv_FileItem.DataSource = ls; Gv_FileItem.DataBind(); Gv_FileItem.Visible = true; } else { List<LabMS.Model.Attachment> ls = new List<LabMS.Model.Attachment>(); ls.Add(attach); Gv_File.DataSource = ls; Gv_File.DataBind(); Gv_File.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { strPagePrivilege.Add("GZZD"); if (UserType == "student" || UserType == "teacher") { modifybtn.Visible = false; DeleteBtn.Visible = false; } if (Request.QueryString["ID"] != null) { if (!IsPostBack) { int ID; string strID = Request.QueryString["ID"].ToString(); if (int.TryParse(strID, out ID)) { IDHF.Value = ID.ToString(); ExtendBLL.Rule rule = new ExtendBLL.Rule(); DataSet ds = new DataSet(); ds = rule.GetList("[ID]=" + ID); CodeNumLbl.Text = ds.Tables[0].Rows[0]["Rule_CodeNum"].ToString(); TitleLbl.Text = ds.Tables[0].Rows[0]["Rule_Title"].ToString(); SubTitleLbl.Text = ds.Tables[0].Rows[0]["Rule_SubTitle"].ToString(); KeyLbl.Text = ds.Tables[0].Rows[0]["Rule_KeyWord"].ToString(); OutputUnitLbl.Text = ds.Tables[0].Rows[0]["Rule_OutputUnit"].ToString(); ResourceContentLbl.Text = ds.Tables[0].Rows[0]["Rule_Content"].ToString();//内容 ModifyDateLbl.Text = string.Format("{0:d}", ds.Tables[0].Rows[0]["Rule_Date"].ToString());//日期 List<LabMS.Model.Dictionary> dic = new List<LabMS.Model.Dictionary>(); //绑定数据字典 dic = DictionaryDropdownlist("118"); RuleKindDDL.DataSource = dic; RuleKindDDL.DataBind(); RuleKindDDL.SelectedValue = ds.Tables[0].Rows[0]["Rule_Type"].ToString(); //绑定录入单位 LabDropdowlist(); InputUnitDDL.SelectedValue = ds.Tables[0].Rows[0]["Rule_InputUnit"].ToString(); //获取文件列表 string strHTML = ""; if (ds.Tables[0].Rows[0]["AttachmentID"].ToString() != "") { LabMS.BLL.AttachmentItem attIte = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> attIteModelList = new List<LabMS.Model.AttachmentItem>(); attIteModelList = attIte.GetModelList("Attach_ID=" + int.Parse(ds.Tables[0].Rows[0]["AttachmentID"].ToString())); for (int i = 0; i < attIteModelList.Count; i++) { strHTML += "<a onclick='downloadfile(" + attIteModelList[i].ID + ")'>"; strHTML += attIteModelList[i].Item_Name; strHTML += "</a>"; strHTML += "<br/>"; } filehtml.InnerHtml = strHTML; } } else { ERRLbl.Text = "系统异常,ID值不合法!"; ERRLbl.Visible = true; modifybtn.Visible = false; DeleteBtn.Visible = false; } } } else { ERRLbl.Text = "系统异常,ID值不合法!"; ERRLbl.Visible = true; modifybtn.Visible = false; DeleteBtn.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { strPagePrivilege.Add("GZZD"); strPageUserType.Add("mana"); if (Request.QueryString["ID"] == null) { if (!IsPostBack) { List<LabMS.Model.Dictionary> list = new List<LabMS.Model.Dictionary>(); //���ƶȷ��� list = DictionaryDropdownlist("118"); RuleKindDDL.DataSource = list; RuleKindDDL.DataBind(); //��¼�뵥λ LabDropdowlist(); } } else { label1.Visible = false; label2.Visible = true; if (!IsPostBack) { int ID; string strID = Request.QueryString["ID"].ToString(); if (int.TryParse(strID, out ID)) { ViewState["ID"] = ID; ExtendBLL.Rule rule = new ExtendBLL.Rule(); DataSet ds = new DataSet(); ds = rule.GetList("[ID]=" + ID); CodeNumTBX.Text = ds.Tables[0].Rows[0]["Rule_CodeNum"].ToString(); TitleTBX.Text = ds.Tables[0].Rows[0]["Rule_Title"].ToString(); SubTitleTBX.Text = ds.Tables[0].Rows[0]["Rule_SubTitle"].ToString(); KeyTBX.Text = ds.Tables[0].Rows[0]["Rule_KeyWord"].ToString(); OutputUnitTBX.Text = ds.Tables[0].Rows[0]["Rule_OutputUnit"].ToString(); ResourceContent.Text = LabMS.Common.codehelper.Decode(ds.Tables[0].Rows[0]["Rule_Content"].ToString());//���� ModifyDateTBX.Text = string.Format("{0:d}", ds.Tables[0].Rows[0]["Rule_Date"].ToString());//���� List<LabMS.Model.Dictionary> dic = new List<LabMS.Model.Dictionary>(); //�������ֵ� dic = DictionaryDropdownlist("118"); RuleKindDDL.DataSource = dic; RuleKindDDL.DataBind(); RuleKindDDL.SelectedValue = ds.Tables[0].Rows[0]["Rule_Type"].ToString(); //��¼�뵥λ LabDropdowlist(); InputUnitDDL.SelectedValue = ds.Tables[0].Rows[0]["Rule_InputUnit"].ToString(); //��ȡ�ļ��б� string strHTML = ""; if (ds.Tables[0].Rows[0]["AttachmentID"].ToString() != "") { AttachIDHF.Value = ds.Tables[0].Rows[0]["AttachmentID"].ToString(); LabMS.BLL.AttachmentItem attIte = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> attIteModelList = new List<LabMS.Model.AttachmentItem>(); attIteModelList = attIte.GetModelList("Attach_ID=" + int.Parse(ds.Tables[0].Rows[0]["AttachmentID"].ToString())); strHTML += "<table>"; for (int i = 0; i < attIteModelList.Count; i++) { strHTML += "<tr>"; strHTML += "<td style='display:none;'>"; strHTML += attIteModelList[i].ID; strHTML += "</td>"; strHTML += "<td>"; strHTML += "<a>"; strHTML += "ɾ��"; strHTML += "</a>"; strHTML += "</td>"; strHTML += "<td>"; strHTML += attIteModelList[i].Item_Name; strHTML += "</td>"; strHTML += "</tr>"; } strHTML += "</table>"; filehtml.Value = strHTML; } } else { SaveBtn.Visible = false; ERRLbl.Text = "ϵͳ�쳣��IDֵ���Ϸ���"; ERRLbl.Visible = true; } } } ModifyDateTBX.Attributes.Add("onclick", "c.showMoreDay = false;c.show(this);"); ModifyDateTBX.Attributes.Add("readOnly", "-1"); }
protected bool SaveItem(LabMS.Model.ProjectApp applicationmodel) { bool save = false; if (applicationmodel != null) { int Attach_ID = 0; if (applicationmodel.App_Attachment == null) { if (HttpContext.Current.Request.Files.Count - 1 > 0) { LabMS.Model.Attachment attachmodel = new LabMS.Model.Attachment(); LabMS.BLL.Attachment Attach = new LabMS.BLL.Attachment(); applicationmodel.App_Attachment = Attach.Add(attachmodel); } } else { Attach_ID = applicationmodel.App_Attachment.Value; } if (Attach_ID != 0) { //ɾ�� try { LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); ls = AttachItem.GetModelList("Item_Type='1' and Attach_ID=" + Attach_ID); string[] array1 = itemIDs.Value.Split(','); if (array1[0] != "") { for (int i = 0; i < array1.Length; i++) { int itemid = 0; if (int.TryParse(array1[i], out itemid)) { AttachItem.Delete(itemid); } } } } catch(Exception ex) { lb_Error.Text = ex.Message; } //��� if (HttpContext.Current.Request.Files.Count-1 > 0) { try { LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); LabMS.Model.AttachmentItem itemmodel; HttpFileCollection Files = HttpContext.Current.Request.Files; string savePath = Request.MapPath(@"../Content/UpLoadFile/"); List<string> fileNames = LabMS.Common.FileUpload.SaveFiles(Files, savePath); for (int n = 0; n < fileNames.Count; n++) { itemmodel = new LabMS.Model.AttachmentItem(); itemmodel.Item_Address = "Content/UpLoadFile/" + fileNames[n].Trim(); int index = fileNames[n].LastIndexOf("_"); itemmodel.Item_Name = fileNames[n].Substring(0, fileNames[n].LastIndexOf("_")); itemmodel.Attach_ID = Attach_ID; itemmodel.Item_Type = "1"; AttachItem.Add(itemmodel); } save = true; } catch { save = false; } } } } return save; }
protected void AttachItemDataBind() { LabMS.BLL.ProjectApp Application = new LabMS.BLL.ProjectApp(); LabMS.Model.ProjectApp applicationmodel = new LabMS.Model.ProjectApp(); LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); if (QueryString != 0) { applicationmodel = Application.GetModel(QueryString); int Attach_ID = 0; if (applicationmodel.App_Attachment != null) { Attach_ID = applicationmodel.App_Attachment.Value; ls = AttachItem.GetModelList("Item_Type ='1' and Attach_ID=" + Attach_ID); if (ls.Count != 0) { string strHTML = "<table>"; for (int i = 0; i < ls.Count; i++) { strHTML += "<tr>"; strHTML += "<td style='display:none;'>"; strHTML += ls[i].ID; strHTML += "</td>"; strHTML += "<td>"; strHTML += "<a>"; strHTML += "ɾ��"; strHTML += "</a>"; strHTML += "</td>"; strHTML += "<td>"; strHTML += ls[i].Item_Name; strHTML += "</td>"; strHTML += "</tr>"; } strHTML += "</table>"; itemlist.Value = strHTML; } } } }
protected void AttachItemDataBind() { if (!string.IsNullOrEmpty(Request.QueryString["ID"])) { int ID = 0; if (int.TryParse(Request.QueryString["ID"], out ID)) { LabMS.BLL.OpentProject OpenProject = new LabMS.BLL.OpentProject(); LabMS.Model.OpentProject openprojectmodel = new LabMS.Model.OpentProject(); LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); openprojectmodel = OpenProject.GetModel(ID); if (openprojectmodel != null) { if (openprojectmodel.Attachment != null) { int Attach_ID = openprojectmodel.Attachment.Value; if (Attach_ID != 0) { ls = AttachItem.GetModelList("Attach_ID=" + Attach_ID); if (ls.Count != 0) { string strHTML = "<table>"; for (int i = 0; i < ls.Count; i++) { strHTML += "<tr>"; strHTML += "<td style='display:none;'>"; strHTML += ls[i].ID; strHTML += "</td>"; strHTML += "<td>"; strHTML += "<a>"; strHTML += "删除"; strHTML += "</a>"; strHTML += "</td>"; strHTML += "<td>"; strHTML += ls[i].Item_Name; strHTML += "</td>"; strHTML += "</tr>"; } strHTML += "</table>"; itemlist.Value = strHTML; } } } } } } }
protected void Gv_FileList_DataBinds() { if (HF_QueryString != QueryString || QueryString <= 0) { Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>window.location.href='~/err.aspx?Message=��ѯ�ַ�������';</script>"); return; } if (QueryString != 0) { LabMS.BLL.ProjectApp Application = new LabMS.BLL.ProjectApp(); LabMS.Model.ProjectApp model = new LabMS.Model.ProjectApp(); model = Application.GetModel(QueryString); if (model.App_Attachment != null || model.App_Attachment != 0) { LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); if (model.App_Attachment != null) { ls = AttachItem.GetModelList("Attach_ID=" + model.App_Attachment.Value + " and Item_Type=1"); } Gv_FileList.DataSource = ls; Gv_FileList.DataBind(); } } else { lb_Error.Text = "��ѯ�ַ�������"; } }
protected void Gv_FileList_DataBinds() { if (!string.IsNullOrEmpty(Request.QueryString["ID"])) { int ID = 0; int AttachID=0; if (int.TryParse(Request.QueryString["ID"].ToString(), out ID)) { if (ID != 0) { if (HFQueryString != ID) { Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>window.location.href='err.aspx?Message=��ѯ�ַ�������'</script>'"); return; } LabMS.BLL.ProjectApp Application = new LabMS.BLL.ProjectApp(); LabMS.Model.ProjectApp applicationmodel = new LabMS.Model.ProjectApp(); applicationmodel = Application.GetModel(ID); LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); if (applicationmodel.App_Attachment != null) { AttachID = applicationmodel.App_Attachment.Value; if (AttachID != 0) { ls = AttachItem.GetModelList("Attach_ID=" + AttachID.ToString()); } } //if (ls.Count != 0) //{ // for (int n = 0; n < ls.Count; n++) // { // ls[n].Item_Name = ls[n].Item_Name.Substring(0,ls[n].Item_Name.LastIndexOf("_")); // } //} Gv_FileList.DataSource = ls; Gv_FileList.DataBind(); } } } }
protected void Page_Load(object sender, EventArgs e) { strPagePrivilege.Add("ZJSYS"); strPageUserType.Add("mana"); if (Request.QueryString["ID"] == null) { concel.Visible = false; addsublab.Visible = false; tt1.Visible = false; LabName = "ʵ����"; if (!IsPostBack) { List<LabMS.Model.Dictionary> list = new List<LabMS.Model.Dictionary>(); //��ʵ����� list = DictionaryDropdownlist("111"); LabKindDDL.DataSource = list; LabKindDDL.DataBind(); //��ʵ������ list = DictionaryDropdownlist("112"); LabTypeDDL.DataSource = list; LabTypeDDL.DataBind(); //��ʵ�鼶�� list = DictionaryDropdownlist("113"); LabLevelDDL.DataSource = list; LabLevelDDL.DataBind(); //�������� list = DictionaryDropdownlist("114"); AwardLevelDDL.DataSource = list; AwardLevelDDL.DataBind(); //��ʵ����״̬ list = DictionaryDropdownlist("115"); StatusDDL.DataSource = list; StatusDDL.DataBind(); //������ѧ�� //SubjectDropdownlist(); } } else { if (!IsPostBack) { int ID; string strID = Request.QueryString["ID"].ToString(); if (int.TryParse(strID, out ID)) { //if (Page.Request.QueryString["flag"] !=null ) //{ // SaveBtn.Visible = false; // concel.Visible = true; //} //else //{ // concel.Visible = true; // addsublab.Visible = true; //} LabMS.BLL.Lab lab = new LabMS.BLL.Lab(); LabMS.Model.Lab labModel = new LabMS.Model.Lab(); List<LabMS.Model.Dictionary> list = new List<LabMS.Model.Dictionary>(); IDHF.Value = ID.ToString();//�洢IDֵ //��ȡʵ������Ϣ ͨ��ID labModel = lab.GetModel(ID); LabNumTBX.Text = labModel.Lab_Code;//��� LabNameTBX.Text = labModel.Lab_Name;//���� LabName = labModel.Lab_Name; DateTBX.Text = string.Format("{0:d}", labModel.Lab_SetupTime.ToString());//���� ManagerTBX.Text = labModel.Lab_InCharge;//������ TelTBX.Text = labModel.Lab_Phone;//�绰 CurriculumTBX.Text = labModel.Lab_Curriculum;//�е��γ� NumTXB.Text = labModel.Lab_ApprovalCode;//���ĺ� ProfessionTBX.Text = labModel.Lab_Professional;//����רҵ ProjectNumTBX.Text = labModel.Lab_ProjectNum.ToString();//���������� InvestmentTBX.Text = labModel.Lab_Investment.ToString();//Ͷ�ʶ� SubjectTBX.Text = labModel.Lab_Disciplines;//����ѧ�� AwardNumTBX.Text = labModel.Lab_StAwardNum.ToString();//���� //��ȡ�ļ��б� string strHTML = ""; if (labModel.Lab_Summary!= null) { AttachIDHF.Value = labModel.Lab_Summary.ToString(); LabMS.BLL.AttachmentItem attIte = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> attIteModelList = new List<LabMS.Model.AttachmentItem>(); attIteModelList = attIte.GetModelList("Attach_ID=" + int.Parse(labModel.Lab_Summary.ToString())); strHTML += "<table>"; for (int i = 0; i < attIteModelList.Count; i++) { strHTML += "<tr>"; strHTML += "<td style='display:none;'>"; strHTML += attIteModelList[i].ID; strHTML += "</td>"; strHTML += "<td>"; strHTML += "<a>"; strHTML += "ɾ��"; strHTML += "</a>"; strHTML += "</td>"; strHTML += "<td>"; strHTML += attIteModelList[i].Item_Name; strHTML += "</td>"; strHTML += "</tr>"; } strHTML += "</table>"; filehtml.Value = strHTML; } //��ʵ����� list = DictionaryDropdownlist("111"); LabKindDDL.DataSource = list; LabKindDDL.DataBind(); LabKindDDL.SelectedValue = labModel.Lab_Category; //��ʵ������ list = DictionaryDropdownlist("112"); LabTypeDDL.DataSource = list; LabTypeDDL.DataBind(); LabTypeDDL.SelectedValue = labModel.Lab_Type; //��ʵ�鼶�� list = DictionaryDropdownlist("113"); LabLevelDDL.DataSource = list; LabLevelDDL.DataBind(); LabLevelDDL.SelectedValue = labModel.Lab_Level; //�������� list = DictionaryDropdownlist("114"); AwardLevelDDL.DataSource = list; AwardLevelDDL.DataBind(); AwardLevelDDL.SelectedValue = labModel.Lab_AwardLevel; //��ʵ����״̬ list = DictionaryDropdownlist("115"); StatusDDL.DataSource = list; StatusDDL.DataBind(); StatusDDL.SelectedValue = labModel.Lab_State; //������ѧ�� //SubjectDropdownlist(); //DepartmentDDL.SelectedValue = labModel.Lab_Curriculum; //����ʵ������Ϣ SubLabInfo_GridView(ID); SubLabGridView.Visible = true; } else { SaveBtn.Visible = false; ERRLbl.Text = "ϵͳ�쳣��IDֵ���Ϸ���"; ERRLbl.Visible = true; addsublab.Visible = false; } } } DateTBX.Attributes.Add("onclick", "c.showMoreDay = false;c.show(this);"); DateTBX.Attributes.Add("readOnly", "-1"); RoomAreaTBX.Attributes.Add("readOnly", "-1"); SubjectTBX.Attributes.Add("readOnly", "-1"); }
protected void AttachItemDataBind() { if (QueryString != HF_QueryString || QueryString <= 0 || HF_QueryString <= 0) { Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript>window.location.href='err.aspx?Message=��ѯ�ַ�������'</script>"); return; } LabMS.BLL.ProjectApp Application = new LabMS.BLL.ProjectApp(); LabMS.Model.ProjectApp applicationmodel = new LabMS.Model.ProjectApp(); LabMS.BLL.Attachment Attach = new LabMS.BLL.Attachment(); LabMS.Model.Attachment attachmodel = new LabMS.Model.Attachment(); LabMS.BLL.AttachmentItem AttachItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); if (QueryString != 0) { applicationmodel = Application.GetModel(QueryString); int AttachID = 0; if (applicationmodel.App_Attachment != null) { AttachID = applicationmodel.App_Attachment.Value; ls = AttachItem.GetModelList("Item_Type ='2' and Attach_ID=" + AttachID); if (ls.Count != 0) { tb_ID.Value = AttachID.ToString(); } else { btn_download.Attributes.Add("style", "display:none"); } if (ls.Count != 0) { string strHTML = "<table>"; for (int i = 0; i < ls.Count; i++) { strHTML += "<tr>"; strHTML += "<td style='display:none;'>"; strHTML += ls[i].ID; strHTML += "</td>"; strHTML += "<td>"; strHTML += "<a>"; strHTML += "ɾ��"; strHTML += "</a>"; strHTML += "</td>"; strHTML += "<td>"; strHTML += ls[i].Item_Name; strHTML += "</td>"; strHTML += "</tr>"; } strHTML += "</table>"; itemlist.Value = strHTML; } } } else { Submit.Visible = false; lb_Error.Text = "ϵͳ�쳣����ѯ�ַ����쳣"; lb_Error.Visible = true; } }
protected void Gv_File_DataBind() { if (!string.IsNullOrEmpty(Request.QueryString["ID"])) { if (IsNumber(Request.QueryString["ID"].Trim())) { int num=0; if (int.TryParse(Request.QueryString["ID"].Trim(), out num)) { LabMS.BLL.AttachmentItem AttachmentItem = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> ls = new List<LabMS.Model.AttachmentItem>(); LabMS.Model.OpentProject openprojectmodel = new LabMS.Model.OpentProject(); LabMS.BLL.OpentProject OpenProject = new LabMS.BLL.OpentProject(); openprojectmodel= OpenProject.GetModel(num); if (openprojectmodel != null) { if (openprojectmodel.Attachment != null) { ls = AttachmentItem.GetModelList("Attach_ID=" + openprojectmodel.Attachment); } } Gv_File.DataSource = ls; Gv_File.DataBind(); } } } }
protected void Page_Load(object sender, EventArgs e) { strPagePrivilege.Add("SYSXX"); if (UserType == "student" || UserType == "teacher") { modeify.Visible = false; DeleteBtn.Visible = false; addsublab.Visible = false; } if (Request.QueryString["ID"] == null) { ERRLbl.Text = "系统异常,URL参数为空!"; ERRLbl.Visible = true; modeify.Visible = false; DeleteBtn.Visible = false; addsublab.Visible = false; } else { if (Page.Request.QueryString["flag"] != null) { modeify.Visible = false; DeleteBtn.Visible = false; addsublab.Visible = false; } if (!IsPostBack) { int ID; string strID = Request.QueryString["ID"].ToString(); if (int.TryParse(strID, out ID)) { LabMS.BLL.Lab lab = new LabMS.BLL.Lab(); LabMS.Model.Lab labModel = new LabMS.Model.Lab(); List<LabMS.Model.Dictionary> list = new List<LabMS.Model.Dictionary>(); string[] strArray = new string[2]; IDHF.Value = ID.ToString();//存储ID值 //获取实验室信息 通过ID labModel = lab.GetModel(ID); LabNumLbl.Text = labModel.Lab_Code;//编号 LabNameLbl.Text = labModel.Lab_Name;//名字 LabName = labModel.Lab_Name; DateLbl.Text = string.Format("{0:d}", labModel.Lab_SetupTime.ToString());//日期 ManagerLbl.Text = labModel.Lab_InCharge;//负责人 TelLbl.Text = labModel.Lab_Phone;//电话 CurriculumLbl.Text = labModel.Lab_Curriculum;//承担课程 NumLbl.Text = labModel.Lab_ApprovalCode;//批准文号 ProfessionLbl.Text = labModel.Lab_Professional;//面向专业 ProjectNumLbl.Text = labModel.Lab_ProjectNum.ToString();//科研任务数 InvestmentLbl.Text = labModel.Lab_Investment.ToString();//投资额 SubjectLbl.Text = labModel.Lab_Disciplines;//所属学科 AwardNumLbl.Text = labModel.Lab_StAwardNum.ToString();//获奖数 StatementLbl.Text = labModel.Lab_Statement;//备注 //获取文件列表 string strHTML = ""; if (labModel.Lab_Summary != null) { LabMS.BLL.AttachmentItem attIte = new LabMS.BLL.AttachmentItem(); List<LabMS.Model.AttachmentItem> attIteModelList = new List<LabMS.Model.AttachmentItem>(); attIteModelList = attIte.GetModelList("Attach_ID=" + int.Parse(labModel.Lab_Summary.ToString())); for (int i = 0; i < attIteModelList.Count; i++) { strHTML += "<a onclick='downloadfile("+attIteModelList[i].ID+")'>"; strHTML += attIteModelList[i].Item_Name; strHTML += "</a>"; strHTML += "<br/>"; } filehtml.InnerHtml = strHTML; } //绑定实验类别 list = DictionaryDropdownlist("111"); LabKindDDL.DataSource = list; LabKindDDL.DataBind(); LabKindDDL.SelectedValue = labModel.Lab_Category; //绑定实验类型 list = DictionaryDropdownlist("112"); LabTypeDDL.DataSource = list; LabTypeDDL.DataBind(); LabTypeDDL.SelectedValue = labModel.Lab_Type; //绑定实验级别 list = DictionaryDropdownlist("113"); LabLevelDDL.DataSource = list; LabLevelDDL.DataBind(); LabLevelDDL.SelectedValue = labModel.Lab_Level; //绑定奖励级别 list = DictionaryDropdownlist("114"); AwardLevelDDL.DataSource = list; AwardLevelDDL.DataBind(); AwardLevelDDL.SelectedValue = labModel.Lab_AwardLevel; //绑定实验室状态 list = DictionaryDropdownlist("115"); StatusDDL.DataSource = list; StatusDDL.DataBind(); StatusDDL.SelectedValue = labModel.Lab_State; //绑定子实验室信息 SubLabInfo_GridView(ID); SubLabGridView.Visible = true; } else { ERRLbl.Text = "系统异常,ID值不合法!"; ERRLbl.Visible = true; modeify.Visible = false; DeleteBtn.Visible = false; addsublab.Visible = false; } } } }