예제 #1
0
 private void Save()
 {
     DATA.paformcompanies proc = new paformcompanies();
     string from = (dpFrom.Checked) ? dpFrom.Value.ToString("yyyy-MM-dd") : "";
     string to = (dpTo.Checked) ? dpTo.Value.ToString("yyyy-MM-dd") : "";
     decimal ret = proc.settelephoneformat(_Telephoneid, tbFormat.Text, cmbFormatTypes.Text, from, to);
     if (ret == 1)
         this.Close();
     else
         tbMessage.Text = "Update failed!";
 }
예제 #2
0
        private void Save()
        {
            Decimal ret;
            paformcompanies proc = new paformcompanies();
            ret = proc.setcompanysyns(_Name, mlSyns.Text.Replace("\r\n", "|"));
            if (ret == 1)
                this.Close();
            else
                MessageBox.Show("Error!", "Update of synonyms failed!", MessageBoxButtons.OK, MessageBoxIcon.Error);

            if (tbSortAs.Text != _sortname)
            {

                ret = proc.setcompanysortname(_locationd, tbSortAs.Text);
                if (ret == 1)
                    this.Close();
                else
                    MessageBox.Show("Error!", "Update of sort as failed!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }