Beispiel #1
0
        protected void SaveForm(object sender, EventArgs e)
        {
            try
            {
                ConfigModel configModel = ConfigOperater.GetConfigModel();
                configModel.SqlConnectionString = SqlConnectionString.Text;
                configModel.TableName           = TableName.Text;
                configModel.UploadPath          = UploadPath.Text;
                configModel.StartRow            = Convert.ToInt32(StartRow.Text);

                ConfigOperater.UpdateConfigModel(configModel);
            }
            catch (Exception ex)
            {
                Response.Write(ex);
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ConfigModel model = ConfigOperater.GetConfigModel();

            if (SqlField != "")
            {
                FieldModel modelField = model.ListField.Find(u => u.SQLField == SqlField);
                if (modelField != null)
                {
                    model.ListField.Remove(modelField);

                    ConfigOperater.UpdateConfigModel(model);
                }
            }

            Response.Redirect("/excel/excelimport.aspx");
        }