private void AddUpdateFeauture() { SageFeatureInfo ObjInfo = new SageFeatureInfo(); ObjInfo.UserModuleID = userModuleID; ObjInfo.PortalID = GetPortalID; ObjInfo.Culture = GetCurrentCulture(); ObjInfo.FeatID = Int32.Parse(hdnFeatureID.Value); ObjInfo.Title = txtTitle.Text; ObjInfo.Description = txtDescription.Text; ObjInfo.IsActive = chkIsActive.Checked; ObjInfo.AddedBy = GetUsername; ObjInfo.ImageName = txtHdnImageName.Text; if (fileUploadFeatImage.HasFile) { ObjInfo.ImageName = SaveImage(); } SageFeatureController objCon = new SageFeatureController(); objCon.AddUpdate(ObjInfo); if (ObjInfo.FeatID > 0) { ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/SageFeature/ModuleLocalText", "UpdatedSuccess"), "", SageMessageType.Success); } else { ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/SageFeature/ModuleLocalText", "Savedsuccess"), "", SageMessageType.Success); } }
private void EditContent(int ID) { SageFeatureController objCon = new SageFeatureController(); SageFeatureInfo objInfo = objCon.GetByID(ID); hdnFeatureID.Value = objInfo.FeatID.ToString(); txtTitle.Text = objInfo.Title; txtDescription.Text = objInfo.Description; chkIsActive.Checked = objInfo.IsActive; txtHdnImageName.Text = objInfo.ImageName; btnSave.Text = "Update"; imgPreview.ImageUrl = "/Modules/SageFeature/img/ThumbLarge/" + objInfo.ImageName; divFeatureForm.Visible = true; divFeatureTable.Visible = false; }