//初始化 public void InitData() { try { int id = Convert.ToInt32(Request.QueryString["id"].ToString()); string str = patent.FindByPatentID(id).PatentDepartment; if (str != "" || str != null) { Content.Text = str; } else { Content.Text = " "; } } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//获得单位 public string getunit(int id) { try { string str = patent.FindByPatentID(id).PatentDepartment; if (str != "" || str != null) { return(str); } else { return(" "); } } catch (Exception ex) { pm.SaveError(ex, this.Request); return(""); } }
//更新赋值 public void UpdateValue() { pat.AccreditTime = tAccreditTime.SelectedDate; pat.ApplicationTime = tApplicationTime.SelectedDate; pat.CertificateNumber = tCertificateNumber.Text.Trim(); pat.Comment = tRemark.Text.Trim(); pat.EntryPerson = patent.FindByPatentID(Convert.ToInt32(Session["PatentID"])).EntryPerson; pat.GivenUnit = tGivenUnit.Text.Trim(); pat.PatentForm = dPatentForm.SelectedText; pat.AgencyID = DropDownListAgency.SelectedText.Trim(); pat.FirstPeople = FirstPeople.Text.Trim(); //pat.Fund = Fund.Text; pat.PatentCondition = dPatentCondition.SelectedText; //pat.ApplyNum = ApplyNum.Text.Trim(); pat.PatentName = tPatentName.Text.Trim(); pat.PatentNumber = tPatentNumber.Text.Trim(); //if (tSecrecyLevel.Text.Trim() == "公开") //{ // pat.SecrecyLevel = 1; //} //if (tSecrecyLevel.Text.Trim() == "秘密") //{ // pat.SecrecyLevel = 3; //} pat.SecrecyLevel = Convert.ToInt32(drSecrecyLevel.SelectedIndex + 1); pat.State = tState.Text.Trim(); pat.PatentPeople = PatentPeople.Text.Trim(); //pat.Member = PatentMember.Text.Trim(); //lby ↓ bool IsHasLetter = false; foreach (char temp in tPatentAuthorization.Text) { if (char.IsLetter(temp)) { IsHasLetter = true; break; } } if (!IsHasLetter) { pat.PatentAuthorization = Convert.ToInt32(tPatentAuthorization.Text); } foreach (char temp in tPatentCertificate.Text) { if (char.IsLetter(temp)) { IsHasLetter = true; break; } } if (!IsHasLetter) { pat.PatentCertificate = Convert.ToInt32(tPatentCertificate.Text); } if (tAchievement.Text.Trim() != "") { pat.AchievementID = tAchievement.Text.Trim(); } else { pat.AchievementID = null; } }