コード例 #1
0
ファイル: ViewPhotoAlbumDAL.cs プロジェクト: barzar90/PMMYA
        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
            {
            }
        }
コード例 #2
0
ファイル: ViewPhotoAlbumDAL.cs プロジェクト: barzar90/PMMYA
        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);
            }
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 public int DMLAlbumPhoto(ViewPhotoAlbumSchema viewPhotoAlbumSchema)
 {
     try
     {
         int result = objViewPhotoAlbum.DMLAlbumPhoto(viewPhotoAlbumSchema);
         return(result);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
コード例 #5
0
ファイル: FrmViewPhoto.aspx.cs プロジェクト: barzar90/PMMYA
        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();
        }
コード例 #6
0
 public DataSet CheckValidAlbum(ViewPhotoAlbumSchema viewPhotoAlbumSchema)
 {
     try
     {
         ds = objViewPhotoAlbum.CheckValidAlbum(viewPhotoAlbumSchema);
         return(ds);
     }
     catch (Exception e)
     {
         return(null);
     }
     finally
     {
         ds = null;
     }
 }
コード例 #7
0
ファイル: ViewPhotoAlbumDAL.cs プロジェクト: barzar90/PMMYA
        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);
            }
        }