Exemple #1
0
        public int DMLPlaceHolderList(PlaceHolderSchema objPlaceHolderSchema)
        {
            try
            {
                using (SqlConnection objConn = SQLHelper.OpenConnection())
                {
                    var param = new SqlParameter[]
                    {
                        new SqlParameter("PlaceHolderID", objPlaceHolderSchema.PlaceholderId == 0 ? 0 : objPlaceHolderSchema.PlaceholderId)
                    };

                    int result = SQLHelper.ExecuteNonQuery(objConn, null, CommandType.StoredProcedure, "Usp_DMLPlaceHolderList", param);
                    if (result == 1)
                    {
                        return(result);
                    }
                    else
                    {
                        return(0);
                    }
                }
            }
            catch (Exception ee)
            {
                return(0);
            }
            finally
            {
            }
        }
Exemple #2
0
        public int SavePlaceHolderContentDeatails(PlaceHolderSchema objPlaceHolderSchema)
        {
            try
            {
                using (SqlConnection objConn = SQLHelper.OpenConnection())
                {
                    using (SqlTransaction objTran = objConn.BeginTransaction())
                    {
                        try
                        {
                            var param = new SqlParameter[]
                            {
                                new SqlParameter("@PlaceHolderID", objPlaceHolderSchema.PlaceholderId == 0 ? 0 : objPlaceHolderSchema.PlaceholderId),
                                new SqlParameter("@ActionType", objPlaceHolderSchema.ActionType == null ? (object)DBNull.Value : objPlaceHolderSchema.ActionType),
                                new SqlParameter("@PlaceHolderName", objPlaceHolderSchema.PlaceHolderName == null ? (object)DBNull.Value : objPlaceHolderSchema.PlaceHolderName),
                                new SqlParameter("@ShortDescription", objPlaceHolderSchema.ShortDescription == null ? (object)DBNull.Value : objPlaceHolderSchema.ShortDescription),
                                new SqlParameter("@ShortDescription_LL", objPlaceHolderSchema.ShortDescription_LL == null ? (object)DBNull.Value : objPlaceHolderSchema.ShortDescription_LL),
                                new SqlParameter("@ShortDescription_UL", objPlaceHolderSchema.ShortDescription_UL == null ? (object)DBNull.Value : objPlaceHolderSchema.ShortDescription_UL),
                                new SqlParameter("@UpdatedBy", objPlaceHolderSchema.UpdatedBy == null ? (object)DBNull.Value : objPlaceHolderSchema.UpdatedBy),
                                new SqlParameter("@CreatedBy", objPlaceHolderSchema.CreatedBy == null ? (object)DBNull.Value : objPlaceHolderSchema.CreatedBy),
                                new SqlParameter("@IsApprove", objPlaceHolderSchema.IsApprove == false ? Convert.ToBoolean(0) : objPlaceHolderSchema.IsApprove),
                                new SqlParameter("@IsActive", objPlaceHolderSchema.IsActive == false ? Convert.ToBoolean(0) : objPlaceHolderSchema.IsActive),
                            };

                            int result = SQLHelper.ExecuteNonQuery(objConn, objTran, CommandType.StoredProcedure, "Usp_DMLPlaceHolderContent", param);
                            if (result == 1)
                            {
                                objTran.Commit();
                                return(result);
                            }
                            else
                            {
                                objTran.Rollback();
                                return(0);
                            }
                        }

                        catch (Exception ex)
                        {
                            objTran.Rollback();
                            return(0);
                        }
                    }
                }
            }
            catch (Exception ee)
            {
                return(0);
            }
            finally
            {
            }
        }
Exemple #3
0
 public int DMLPlaceHolderList(PlaceHolderSchema objPlaceHolderSchema)
 {
     try
     {
         result = objplaceholderDAL.DMLPlaceHolderList(objPlaceHolderSchema);
         return(result);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemple #4
0
 public int SavePlaceHolderContentDeatails(PlaceHolderSchema objPlaceHolderSchema)
 {
     try
     {
         result = objplaceholderDAL.SavePlaceHolderContentDeatails(objPlaceHolderSchema);
         return(result);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemple #5
0
 public DataSet GetPlaceHolderContentDetails(PlaceHolderSchema objPlaceHolderSchema)
 {
     try
     {
         ds = objplaceholderDAL.GetPlaceHolderContentDetails(objPlaceHolderSchema);
         return(ds);
     }
     catch (Exception e)
     {
         return(null);
     }
     finally
     {
         ds = null;
     }
 }
Exemple #6
0
        public DataSet GetPlaceHolderContentDetails(PlaceHolderSchema objPlaceHolderSchema)
        {
            SqlConnection objConn = SQLHelper.OpenConnection();

            try
            {
                SqlParameter[] param = new SqlParameter[1];
                param[0]       = new SqlParameter("@PlaceHolderID", SqlDbType.Int);
                param[0].Value = objPlaceHolderSchema.PlaceholderId;

                using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "Usp_GetPlaceHolderContent", param))
                {
                    return(ds);
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                SQLHelper.CloseConnection(objConn);
            }
        }