Example #1
0
        public string GetAppProperty(string propName)
        {
            SAppProps prop = SqlMapHelper.DefaultSqlMap.QueryForObject <SAppProps>("SelectSAppPropsByPropName", propName);

            if (prop == null)
            {
                return(string.Empty);
            }
            return(prop.PropValue);
        }
Example #2
0
 //修改
 private void tsbEdit_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow != null)
     {
         int       id   = (int)dataGridView1.CurrentRow.Cells["propid"].Value;
         SAppProps data = RecordService.GetOneByKey <SAppProps>(id);
         using (FrmAppPropEdit dlg = new FrmAppPropEdit()) {
             dlg.DataObject = data;
             if (dlg.ShowDialog() == DialogResult.OK)
             {
                 RecordService.Update <SAppProps>(data);
                 RefreshData();
             }
         }
     }
 }