示例#1
0
 private void SaveorEdit()
 {
     try
     {
         QuickLaunchItemsInfo infoQuickLaunchItems = new QuickLaunchItemsInfo();
         QuickLaunchItemsSP   spQuickLaunchItems   = new QuickLaunchItemsSP();
         if (dtblSelected.Rows.Count >= 1)
         {
             foreach (DataRow row in dtblSelected.Rows)
             {
                 infoQuickLaunchItems.ItemsName          = row.ItemArray[0].ToString();
                 infoQuickLaunchItems.QuickLaunchItemsId = Convert.ToDecimal(row.ItemArray[1]);
                 infoQuickLaunchItems.Status             = true;
                 infoQuickLaunchItems.Extra1             = string.Empty;
                 infoQuickLaunchItems.Extra2             = string.Empty;
                 spQuickLaunchItems.QuickLaunchItemsEdit(infoQuickLaunchItems);
             }
             foreach (DataRow row2 in dtblNonSelected.Rows)
             {
                 infoQuickLaunchItems.ItemsName          = row2.ItemArray[0].ToString();
                 infoQuickLaunchItems.QuickLaunchItemsId = Convert.ToDecimal(row2.ItemArray[1]);
                 infoQuickLaunchItems.Status             = false;
                 infoQuickLaunchItems.Extra1             = string.Empty;
                 infoQuickLaunchItems.Extra2             = string.Empty;
                 spQuickLaunchItems.QuickLaunchItemsEdit(infoQuickLaunchItems);
             }
             Messages.SavedMessage();
             base.Close();
         }
         else
         {
             MessageBox.Show("Select atleast one form in quick launch", "Openmiracle", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "MC:3 " + ex.Message;
     }
 }
示例#2
0
        /// <summary>
        /// Function to Update values in tbl_QuickLaunchItems Table
        /// </summary>
        /// <param name="infoQuickLaunchItems"></param>
        public void QuickLaunchItemsEdit(QuickLaunchItemsInfo infoQuickLaunchItems)
        {
            QuickLaunchItemsSP SPQuickLaunchItems = new QuickLaunchItemsSP();

            try
            {
                SPQuickLaunchItems.QuickLaunchItemsEdit(infoQuickLaunchItems);
            }
            catch (Exception ex)
            {
                MessageBox.Show("QLIBll 2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }