コード例 #1
0
 /// <summary>
 /// Function to save new rack
 /// </summary>
 public void SaveFunction()
 {
     try
     {
         RackSP   spRack   = new RackSP();
         RackInfo rackInfo = new RackInfo();
         rackInfo.RackName  = txtRackName.Text.Trim();
         rackInfo.GodownId  = Convert.ToDecimal(cmbGodown.SelectedValue.ToString());
         rackInfo.Narration = txtNarration.Text.Trim();
         rackInfo.ExtraDate = DateTime.Now;
         rackInfo.Extra1    = string.Empty;
         rackInfo.Extra2    = string.Empty;
         decimal decGodounId = Convert.ToDecimal(cmbGodown.SelectedValue.ToString());
         if (spRack.RackCheckExistence(txtRackName.Text.Trim(), 0, decGodounId) == false)
         {
             decIdForOtherForms = spRack.RackAdd(rackInfo);
             if (decIdForOtherForms > 0)
             {
                 Messages.SavedMessage();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage(" Rack name already exist");
             txtRackName.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("R7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #2
0
        /// <summary>
        /// Function to check rack name alredy exist or not
        /// </summary>
        /// <returns></returns>
        public bool CheckExistenceOfRackName()
        {
            bool isExist = false;

            try
            {
                RackSP spRack = new RackSP();
                isExist = spRack.RackCheckExistence(txtRackName.Text.Trim(), 0, Convert.ToDecimal(cmbGodown.SelectedValue.ToString()));
                if (isExist)
                {
                    string strRackNames = txtRackName.Text.Trim();
                    if (strRackNames.ToLower() == strRackName.ToLower())
                    {
                        isExist = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("R6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(isExist);
        }
コード例 #3
0
ファイル: frmRack.cs プロジェクト: nwelsheimer/NBS
        /// <summary>
        /// Function to check rack name alredy exist or not
        /// </summary>
        /// <returns></returns>
        public bool CheckExistenceOfRackName()
        {
            bool isExist = false;

            try
            {
                RackSP spRack = new RackSP();
                isExist = spRack.RackCheckExistence(txtRackName.Text.Trim(), 0, Convert.ToDecimal(cmbGodown.SelectedValue.ToString()));
                if (isExist)
                {
                    string strRackNames = txtRackName.Text.Trim();
                    if (strRackNames.ToLower() == strRackName.ToLower())
                    {
                        isExist = false;
                    }
                }
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "R6:" + ex.Message;
            }
            return(isExist);
        }
コード例 #4
0
ファイル: frmRack.cs プロジェクト: jsoques/openmiracle
 /// <summary>
 /// Function to save new rack
 /// </summary>
 public void SaveFunction()
 {
     try
     {
             RackSP spRack = new RackSP();
             RackInfo rackInfo = new RackInfo();
             rackInfo.RackName = txtRackName.Text.Trim();
             rackInfo.GodownId = Convert.ToDecimal(cmbGodown.SelectedValue.ToString());
             rackInfo.Narration = txtNarration.Text.Trim();
             rackInfo.ExtraDate = DateTime.Now;
             rackInfo.Extra1 = string.Empty;
             rackInfo.Extra2 = string.Empty;
             decimal decGodounId=Convert.ToDecimal(cmbGodown.SelectedValue.ToString());
             if (spRack.RackCheckExistence(txtRackName.Text.Trim(), 0, decGodounId) == false)
             {
                 decIdForOtherForms = spRack.RackAdd(rackInfo);
                 if (decIdForOtherForms > 0)
                 {
                     Messages.SavedMessage();
                     Clear();
                 }
             }
             else
             {
                 Messages.InformationMessage(" Rack name already exist");
                 txtRackName.Focus();
             }
     }
     catch (Exception ex)
     {
         MessageBox.Show("R7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #5
0
ファイル: frmRack.cs プロジェクト: jsoques/openmiracle
 /// <summary>
 /// Function to check rack name alredy exist or not
 /// </summary>
 /// <returns></returns>
 public bool CheckExistenceOfRackName()
 {
     bool isExist = false;
     try
     {
         RackSP spRack = new RackSP();
         isExist = spRack.RackCheckExistence(txtRackName.Text.Trim(), 0,Convert.ToDecimal(cmbGodown.SelectedValue.ToString()));
         if (isExist)
         {
             string strRackNames = txtRackName.Text.Trim();
             if (strRackNames.ToLower() == strRackName.ToLower())
             {
                 isExist = false;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("R6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     return isExist;
 }