Ejemplo n.º 1
0
        public override NBrightInfo EventBeforeUpdate(System.Web.UI.WebControls.Repeater rpData, NBrightDNN.NBrightInfo objInfo)
        {
            // check we have a unique modulekey and then return the new key for updating.
            var dbKey = "";
            var objDb = ModCtrl.Get(objInfo.ItemID);

            if (objDb != null)
            {
                dbKey = objDb.GetXmlProperty("genxml/textbox/modulekey");
            }
            var newKey = objInfo.GetXmlProperty("genxml/textbox/modulekey");

            if (newKey != dbKey)
            {
                newKey = NBrightBuyUtils.GetUniqueKeyRef(PortalId, ModuleId, newKey, 0);
                objInfo.SetXmlProperty("genxml/textbox/modulekey", newKey);
                objInfo.GUIDKey = newKey;
            }
            return(objInfo);
        }
Ejemplo n.º 2
0
        public override void EventAfterUpdate(System.Web.UI.WebControls.Repeater rpData, NBrightDNN.NBrightInfo objInfo)
        {
            // set page size so we pick it up in the product view.
            var navigationdata = new NavigationData(PortalId, objInfo.GetXmlProperty("genxml/textbox/modulekey"));

            navigationdata.PageSize = objInfo.GetXmlProperty("genxml/textbox/pagesize");
            navigationdata.Save();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// override for Database Function
 /// </summary>
 /// <param name="objInfo"></param>
 /// <returns></returns>
 public override int Update(NBrightInfo objInfo)
 {
     objInfo.ModifiedDate = DateTime.Now;
     return(DataProvider.Instance().Update(objInfo.ItemID, objInfo.PortalId, objInfo.ModuleId, objInfo.TypeCode, objInfo.XMLData, objInfo.GUIDKey, objInfo.ModifiedDate, objInfo.TextData, objInfo.XrefItemId, objInfo.ParentItemId, objInfo.UserId, objInfo.Lang));
 }