Ejemplo n.º 1
0
 private void DeleteList(int entryId)
 {
     try
     {
         ListManagementDataContext dbList = new ListManagementDataContext(SystemSetting.SageFrameConnectionString);
         var deleteList = dbList.sp_ListEntryDeleteByID(entryId, true, GetCurrentCultureName);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Ejemplo n.º 2
0
 protected void gdvSubList_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         ListManagementDataContext dbList = new ListManagementDataContext(SystemSetting.SageFrameConnectionString);
         int entryId = int.Parse(e.CommandArgument.ToString());
         if (e.CommandName == "Delete")
         {
             try
             {
                 var deleteList = dbList.sp_ListEntryDeleteByID(entryId, true, GetCurrentCultureName);
                 // ShowMessage(SageMessageTitle.Information.ToString(), "List is deleted successfully", "", SageMessageType.Success);
                 ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "ListIsDeletedSuccessfully"), "", SageMessageType.Success);
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         else if (e.CommandName == "SortUp")
         {
             try
             {
                 var sortList = dbList.sp_ListSortOrderUpdate(entryId, true, GetCurrentCultureName);
                 //  ShowMessage(SageMessageTitle.Information.ToString(), "The List is shifted up successfully", "", SageMessageType.Success);
                 ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "TheListIsShiftedUpSuccessfully"), "", SageMessageType.Success);
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         else if (e.CommandName == "SortDown")
         {
             try
             {
                 var sortList = dbList.sp_ListSortOrderUpdate(entryId, false, GetCurrentCultureName);
                 // ShowMessage(SageMessageTitle.Information.ToString(), "The List is shifted downn successfully", "", SageMessageType.Success);
                 ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "TheListIsShiftedDownSuccessfully"), "", SageMessageType.Success);
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         else if (e.CommandName == "Edit")
         {
             try
             {
                 HideControls();
                 ViewState["ENTRYID"] = entryId;
                 var editList = dbList.sp_GetListEntrybyNameValueAndEntryID("", "", entryId, GetCurrentCultureName);
                 foreach (sp_GetListEntrybyNameValueAndEntryIDResult getListEntry in editList)
                 {
                     txtEntryText.Text     = getListEntry.Text;
                     txtEntryValue.Text    = getListEntry.Value;
                     txtCurrencyCode.Text  = getListEntry.CurrencyCode;
                     txtDisplayLocale.Text = getListEntry.DisplayLocale;
                     chkActive.Checked     = (bool)getListEntry.IsActive;
                     AddEditMode();
                     //  ShowMessage(SageMessageTitle.Information.ToString(), "List is edited successfully", "", SageMessageType.Success);
                     //ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "ListIsEditedSuccessfully"), "", SageMessageType.Success);
                 }
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         if (ViewState["LISTNAME"] != null)
         {
             BindGrid(ViewState["LISTNAME"].ToString(), ViewState["PARENTKEY"].ToString());
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Ejemplo n.º 3
0
 protected void gdvSubList_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         ListManagementDataContext dbList = new ListManagementDataContext(SystemSetting.SageFrameConnectionString);
         int entryId = int.Parse(e.CommandArgument.ToString());
         if (e.CommandName == "Delete")
         {
             try
             {
                 var deleteList = dbList.sp_ListEntryDeleteByID(entryId, true,GetCurrentCultureName);
                // ShowMessage(SageMessageTitle.Information.ToString(), "List is deleted successfully", "", SageMessageType.Success);
                 ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "ListIsDeletedSuccessfully"), "", SageMessageType.Success);
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         else if (e.CommandName == "SortUp")
         {
             try
             {
                 var sortList = dbList.sp_ListSortOrderUpdate(entryId, true,GetCurrentCultureName);
               //  ShowMessage(SageMessageTitle.Information.ToString(), "The List is shifted up successfully", "", SageMessageType.Success);
                 ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "TheListIsShiftedUpSuccessfully"), "", SageMessageType.Success);
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         else if (e.CommandName == "SortDown")
         {
             try
             {
                 var sortList = dbList.sp_ListSortOrderUpdate(entryId, false,GetCurrentCultureName);
                // ShowMessage(SageMessageTitle.Information.ToString(), "The List is shifted downn successfully", "", SageMessageType.Success);
                 ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "TheListIsShiftedDownSuccessfully"), "", SageMessageType.Success);
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         else if (e.CommandName == "Edit")
         {
             try
             {
                 HideControls();
                 ViewState["ENTRYID"] = entryId;
                 var editList = dbList.sp_GetListEntrybyNameValueAndEntryID("", "", entryId,GetCurrentCultureName);
                 foreach (sp_GetListEntrybyNameValueAndEntryIDResult getListEntry in editList)
                 {
                     txtEntryText.Text = getListEntry.Text;
                     txtEntryValue.Text = getListEntry.Value;
                     txtCurrencyCode.Text = getListEntry.CurrencyCode;
                     txtDisplayLocale.Text = getListEntry.DisplayLocale;
                     chkActive.Checked = (bool)getListEntry.IsActive;
                     AddEditMode();
                   //  ShowMessage(SageMessageTitle.Information.ToString(), "List is edited successfully", "", SageMessageType.Success);
                     //ShowMessage(SageMessageTitle.Information.ToString(), GetSageMessage("ListSettings", "ListIsEditedSuccessfully"), "", SageMessageType.Success);
                 }
             }
             catch (Exception ex)
             {
                 ProcessException(ex);
             }
         }
         if (ViewState["LISTNAME"] != null)
         {
             BindGrid(ViewState["LISTNAME"].ToString(), ViewState["PARENTKEY"].ToString());
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Ejemplo n.º 4
0
 private void DeleteList(int entryId)
 {
     try
     {
         ListManagementDataContext dbList = new ListManagementDataContext(SystemSetting.SageFrameConnectionString);
         var deleteList = dbList.sp_ListEntryDeleteByID(entryId, true,GetCurrentCultureName);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }