public int DMLAlbumPhoto(ViewPhotoAlbumSchema objviewPhotoAlbumSchema) { try { using (SqlConnection objConn = SQLHelper.OpenConnection()) { var param = new SqlParameter[] { new SqlParameter("@ActionType", objviewPhotoAlbumSchema.ActionType == null ? (object)DBNull.Value : objviewPhotoAlbumSchema.ActionType), new SqlParameter("@AlbumName", objviewPhotoAlbumSchema.Albumname == null ? (object)DBNull.Value : objviewPhotoAlbumSchema.Albumname), new SqlParameter("@FileName", objviewPhotoAlbumSchema.FileName == null ? (object)DBNull.Value : objviewPhotoAlbumSchema.FileName), new SqlParameter("@PhotoAlbumID", objviewPhotoAlbumSchema.Photoalbumid == 0 ? 0 : objviewPhotoAlbumSchema.Photoalbumid) }; int result = SQLHelper.ExecuteNonQuery(objConn, null, CommandType.StoredProcedure, "Usp_DMLAlbumPhoto", param); if (result == 1) { return(result); } else { return(0); } } } catch (Exception ee) { return(0); } finally { } }
public DataSet CheckValidAlbum(ViewPhotoAlbumSchema objviewPhotoAlbumSchema) { SqlConnection objConn = SQLHelper.OpenConnection(); try { var param = new SqlParameter[] { new SqlParameter("@ActionType", objviewPhotoAlbumSchema.ActionType == null ? (object)DBNull.Value : objviewPhotoAlbumSchema.ActionType), new SqlParameter("@PhotoAlbumID", objviewPhotoAlbumSchema.Photoalbumid == 0 ? 0 : objviewPhotoAlbumSchema.Photoalbumid), new SqlParameter("@Name", objviewPhotoAlbumSchema.Name == null ? (object)DBNull.Value : objviewPhotoAlbumSchema.Name) }; using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "Usp_CheckValidAlbum", null)) { return(ds); } } catch (Exception ex) { return(null); } finally { SQLHelper.CloseConnection(objConn); } }
private void DisplayPhoto() { //lblPhoto.Text = _MahaITUC.GetResourceValue("Common", "lblPhoto", ""); ViewPhotoAlbumBL objviewphotoalbumbl = new ViewPhotoAlbumBL(); ViewPhotoAlbumSchema objPhotoalbumschema = new ViewPhotoAlbumSchema(); DataSet ds = new DataSet(); ds = objviewphotoalbumbl.DisplayPhoto(); lvEventPhoto.DataSource = ds; lvEventPhoto.DataBind(); }
public int DMLAlbumPhoto(ViewPhotoAlbumSchema viewPhotoAlbumSchema) { try { int result = objViewPhotoAlbum.DMLAlbumPhoto(viewPhotoAlbumSchema); return(result); } catch (Exception ex) { return(0); } }
private void DisplayPhoto(int PhotoSubAlbumID) { ViewPhotoAlbumBL objviewphotoalbumbl = new ViewPhotoAlbumBL(); ViewPhotoAlbumSchema objPhotoalbumschema = new ViewPhotoAlbumSchema(); objPhotoalbumschema.PhotoSubAlbumID = Convert.ToInt32(PhotoSubAlbumID); DataSet ds = new DataSet(); ds = objviewphotoalbumbl.ViewPhotoAlbum(objPhotoalbumschema); lblAlbum.Text = GetResourceValue("Common", "lblAlbum", ""); lvEventPhoto.DataSource = ds; lvEventPhoto.DataBind(); }
public DataSet CheckValidAlbum(ViewPhotoAlbumSchema viewPhotoAlbumSchema) { try { ds = objViewPhotoAlbum.CheckValidAlbum(viewPhotoAlbumSchema); return(ds); } catch (Exception e) { return(null); } finally { ds = null; } }
public DataSet GetPhotoAlbum(ViewPhotoAlbumSchema objviewPhotoAlbumSchema) { SqlConnection objConn = SQLHelper.OpenConnection(); try { var param = new SqlParameter[] { new SqlParameter("@PhotoSubAlbumID", objviewPhotoAlbumSchema.PhotoSubAlbumID == 0 ? 0 : objviewPhotoAlbumSchema.PhotoSubAlbumID), }; using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "Usp_ViewPhoto", param)) { return(ds); } } catch (Exception ex) { return(null); } finally { SQLHelper.CloseConnection(objConn); } }