//加载文本框数据至对象 protected bool GetEditDate() { //bool falg = true; dictSmsModule = new daan.domain.DictSmsModule(); if (gvList.SelectedRowIndexArray.Length > 0) { object[] objValue = gvList.DataKeys[gvList.SelectedRowIndexArray[0]]; dictSmsModule.DictSmsModuleid = TypeParse.StrToInt(objValue[0], 0); } dictSmsModule.SmsTitle = txtTitle.Text.Trim(); dictSmsModule.SmsContent = txtContent.Text.Trim(); return(dictSmsModuleService.SaveDictSmsModule(dictSmsModule)); }
//加载当前行至编辑框 protected void SetEditDate() { //新增 dictSmsModule = new daan.domain.DictSmsModule(); SimpleFormEdit.Title = "当前状态-新增"; //编辑 if (gvList.SelectedRowIndexArray.Length > 0) { SimpleFormEdit.Title = "当前状态-编辑"; string[] objValue = gvList.Rows[gvList.SelectedRowIndexArray[0]].Values; dictSmsModule.DictSmsModuleid = TypeParse.StrToInt(objValue[0], 0); dictSmsModule.SmsTitle = objValue[1]; dictSmsModule.SmsContent = objValue[2]; } txtTitle.Text = dictSmsModule.SmsTitle; txtContent.Text = dictSmsModule.SmsContent; }