protected void btnSubmit_Click(object sender, EventArgs e) { if (this.IsValid) { SystemParameter.CollectSystemName = this.txtSystemName.Text.Trim().IsNullOrEmpty() ? "纸币流通管理系统" : this.txtSystemName.Text.Trim(); if ((sender as Button).CommandName == "Save") { if (this.fuLogoPicture.HasFile && this.fuLogoPicture.PostedFile.ContentLength > 0) { HttpPostedFile file = fuLogoPicture.PostedFile; string uploadFolder = FileHelper.ConvertPath("~/App_File/Upload/"); string fileName = FileHelper.GetFileNamebyGuid(FileHelper.GetFileExtensionName(file.FileName)); if (file.SaveFile(uploadFolder, fileName)) { SystemParameter.SystemLogoPicture = fileName; } } } else { SystemParameter.SystemLogoPicture = String.Empty; } SystemParameter.Save(); this.JscriptMsg("数据保存成功", null, "Success"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (this.IsValid) { SystemParameter.DataStorageDays = this.txtDataStorageDays.Text.Trim().ToUInt(); SystemParameter.DataClearTime = this.txtDataClearTime.Text.Trim(); SystemParameter.FileStorageCount = this.txtFileStorageCount.Text.Trim().ToUInt(); SystemParameter.CurrencyInfoColumn = String.Empty; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn1.Checked ? "[1]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn2.Checked ? "[2]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn3.Checked ? "[3]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn4.Checked ? "[4]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn5.Checked ? "[5]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn6.Checked ? "[6]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn7.Checked ? "[7]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn8.Checked ? "[8]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn9.Checked ? "[9]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn10.Checked ? "[10]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn11.Checked ? "[11]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn12.Checked ? "[12]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn13.Checked ? "[13]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn14.Checked ? "[14]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn15.Checked ? "[15]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn16.Checked ? "[16]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn17.Checked ? "[17]" : ""; SystemParameter.CurrencyInfoColumn += this.cbCurrencyInfoColumn18.Checked ? "[18]" : ""; SystemParameter.Save(); this.JscriptMsg("数据保存成功", null, "Success"); } }