예제 #1
0
 public List<MasterPageTemplate> GetAll()
 {
     MasterPageTemplateDAC _masterPageTemplateComponent = new MasterPageTemplateDAC();
      IDataReader reader =  _masterPageTemplateComponent.GetAllMasterPageTemplate().CreateDataReader();
      List<MasterPageTemplate> _masterPageTemplateList = new List<MasterPageTemplate>();
      while(reader.Read())
      {
      if(_masterPageTemplateList == null)
          _masterPageTemplateList = new List<MasterPageTemplate>();
          MasterPageTemplate _masterPageTemplate = new MasterPageTemplate();
          if(reader["MasterPageTemplateId"] != DBNull.Value)
              _masterPageTemplate.MasterPageTemplateId = Convert.ToInt32(reader["MasterPageTemplateId"]);
          if(reader["Name"] != DBNull.Value)
              _masterPageTemplate.Name = Convert.ToString(reader["Name"]);
          if(reader["Path"] != DBNull.Value)
              _masterPageTemplate.Path = Convert.ToString(reader["Path"]);
          if(reader["ClassName"] != DBNull.Value)
              _masterPageTemplate.ClassName = Convert.ToString(reader["ClassName"]);
          if(reader["MasterPageContent"] != DBNull.Value)
              _masterPageTemplate.MasterPageContent = Convert.ToString(reader["MasterPageContent"]);
      _masterPageTemplate.NewRecord = false;
      _masterPageTemplateList.Add(_masterPageTemplate);
      }             reader.Close();
      return _masterPageTemplateList;
 }
예제 #2
0
 public bool Insert(MasterPageTemplate masterpagetemplate)
 {
     int autonumber = 0;
     MasterPageTemplateDAC masterpagetemplateComponent = new MasterPageTemplateDAC();
     bool endedSuccessfuly = masterpagetemplateComponent.InsertNewMasterPageTemplate( ref autonumber,  masterpagetemplate.Name,  masterpagetemplate.Path,  masterpagetemplate.ClassName,  masterpagetemplate.MasterPageContent);
     if(endedSuccessfuly)
     {
         masterpagetemplate.MasterPageTemplateId = autonumber;
     }
     return endedSuccessfuly;
 }
예제 #3
0
 public MasterPageTemplate GetByID(int _masterPageTemplateId)
 {
     MasterPageTemplateDAC _masterPageTemplateComponent = new MasterPageTemplateDAC();
      IDataReader reader = _masterPageTemplateComponent.GetByIDMasterPageTemplate(_masterPageTemplateId);
      MasterPageTemplate _masterPageTemplate = null;
      while(reader.Read())
      {
          _masterPageTemplate = new MasterPageTemplate();
          if(reader["MasterPageTemplateId"] != DBNull.Value)
              _masterPageTemplate.MasterPageTemplateId = Convert.ToInt32(reader["MasterPageTemplateId"]);
          if(reader["Name"] != DBNull.Value)
              _masterPageTemplate.Name = Convert.ToString(reader["Name"]);
          if(reader["Path"] != DBNull.Value)
              _masterPageTemplate.Path = Convert.ToString(reader["Path"]);
          if(reader["ClassName"] != DBNull.Value)
              _masterPageTemplate.ClassName = Convert.ToString(reader["ClassName"]);
          if(reader["MasterPageContent"] != DBNull.Value)
              _masterPageTemplate.MasterPageContent = Convert.ToString(reader["MasterPageContent"]);
      _masterPageTemplate.NewRecord = false;             }             reader.Close();
      return _masterPageTemplate;
 }
예제 #4
0
 public bool Update(MasterPageTemplate masterpagetemplate ,int old_masterPageTemplateId)
 {
     MasterPageTemplateDAC masterpagetemplateComponent = new MasterPageTemplateDAC();
     return masterpagetemplateComponent.UpdateMasterPageTemplate( masterpagetemplate.Name,  masterpagetemplate.Path,  masterpagetemplate.ClassName,  masterpagetemplate.MasterPageContent,  old_masterPageTemplateId);
 }