private void LoadData() { Gallery_Topic topic_obj = GalleryTopic.GetDetails(_idx); txtName.Text = topic_obj.Gallery_TopicName; txtDescription.Text = topic_obj.Description; string sortkey = topic_obj.SortKey.ToString(); rdlStatus.SelectedValue = topic_obj.Status.ToString(); ShowTreeNodes_Topics(topic_obj.ParentId.ToString()); }
public static int? UpdateData(Gallery_Topic entity) { int? o_return = 0; using (GalleryDataContext context = new GalleryDataContext(Settings.ConnectionString)) { string UserLog = Convert.ToString(entity.UserLog); var q = context.Gallery_Topics_Update(UserLog, IP, entity.Gallery_TopicId, entity.Gallery_TopicName, entity.Alias, entity.ParentId, entity.Description, entity.Status, ref o_return); context.SubmitChanges(); return o_return; } }
private int?AddData() { Gallery_Topic topic_obj = new Gallery_Topic(); topic_obj.ParentId = Convert.ToInt32(ddlTreeNode_Topics.SelectedValue); topic_obj.Gallery_TopicName = txtName.Text; topic_obj.Alias = ModuleClass.convertTitle2Link(txtName.Text); topic_obj.Description = txtDescription.Text; topic_obj.Status = Convert.ToChar(rdlStatus.SelectedValue); topic_obj.PostedDate = System.DateTime.Now; topic_obj.UserLog = System.Guid.Parse(Session["UserId"].ToString()); int?i = GalleryTopic.InsertData(topic_obj); return(i); }
private int? UpdateData() { Gallery_Topic topic_obj = new Gallery_Topic(); topic_obj.ParentId = Convert.ToInt32(ddlTreeNode_Topics.SelectedValue); topic_obj.Gallery_TopicName = txtName.Text; topic_obj.Gallery_TopicId = _idx; topic_obj.Alias = ModuleClass.convertTitle2Link(txtName.Text); topic_obj.Description = txtDescription.Text; topic_obj.Status = Convert.ToChar(rdlStatus.SelectedValue); topic_obj.PostedDate = System.DateTime.Now; topic_obj.UserLog = System.Guid.Parse(Session["UserId"].ToString()); int? i = GalleryTopic.UpdateData(topic_obj); return i; }