private void form2obj(OfflineManager obj) { obj.Title = TxtTitle.Text; obj.Message = TxtMessage.Text; obj.Offline = ChkOffline.Checked; obj.Template = DropTemplates.SelectedValue; //obj.OfflineFileName = //obj.OnlineFileName = //obj.OfflineDateTime = //obj.OnlineDateTime = }
protected void BtnSave_Click(object sender, EventArgs e) { LblErr.Text = ""; LblOk.Text = ""; try { var o1 = new OfflineManager(); form2obj(o1); o1.SaveData(); loadData(); OfflineProvider.ResetOfflineStatus(); LblOk.Text = Utility.GetLabel("RECORD_SAVED_MSG"); } catch (Exception e1) { LblErr.Text = Utility.GetLabel("RECORD_ERR_MSG") + "<br />" + e1.ToString(); } finally { } }
private void obj2form(OfflineManager obj) { TxtTitle.Text = obj.Title; TxtMessage.Text = obj.Message; ChkOffline.Checked = obj.Offline; Utility.SetDropByValue(DropTemplates, obj.Template); }
private void loadData() { var o1 = new OfflineManager(); o1.GetData(); obj2form(o1); }