Пример #1
0
 private void uteFormAssembly_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     switch (e.Button.Key)
     {
     case "Choose":
         openFileDialogAssembly.InitialDirectory = Globals.AppPath;
         if (openFileDialogAssembly.ShowDialog(this) == DialogResult.OK)
         {
             string fullName = openFileDialogAssembly.FileName;
             if (fullName.Substring(0, fullName.LastIndexOf(Path.DirectorySeparatorChar)).Equals(openFileDialogAssembly.InitialDirectory))
             {
                 DlgBipFormPicker dlg = new DlgBipFormPicker(fullName);
                 if (dlg.ShowDialog(this) == DialogResult.OK)
                 {
                     string fileName = openFileDialogAssembly.SafeFileName;
                     uteFormAssembly.Text = fileName.Substring(0, fileName.LastIndexOf('.'));
                     txtFormUrl.Text      = dlg.BipFormName;
                 }
             }
             else
             {
                 MetroMessageBox.Show(this, "只能选择默认路径下的动态链接库文件!");
             }
         }
         break;
     }
 }
Пример #2
0
        /// <summary>
        /// Handles the EditorButtonClick event of the FormulaTextBox control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:Infragistics.Win.UltraWinEditors.EditorButtonEventArgs"/> instance containing the event data.</param>
        private void FormulaTextBox_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            if (!this.flagFormDataModify)
            {
                this.CreateColumnHelper();

                try
                {
                    if (null == this.createdColumn)
                    {
                        return;
                    }
                    else
                    {
                        //this.newColumnCreated = true;
                        this.flagUnSavedChangesExists = true;
                    }

                    // In order to design a formula, CalcManager property of the grid must
                    // be assigned an instance of a calc manager. If none is assigned then
                    // create a new one and assign it.

                    if (null == this.createdColumn.Layout.Grid.CalcManager)
                    {
                        this.createdColumn.Layout.Grid.CalcManager = new UltraCalcManager();
                    }

                    this.ShowFormulaBuilderDialog(this.createdColumn as IFormulaProvider);
                    ////Ends here
                    this.formatChanged            = true;
                    this.flagUnSavedChangesExists = true;
                }
                catch (Exception ex)
                {
                    ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this);
                }
            }
            else
            {
                try
                {
                    //// In order to design a formula, CalcManager property of the grid must
                    //// be assigned an instance of a calc manager. If none is assigned then
                    //// create a new one and assign it.
                    if (null == this.band.Columns[this.columnIndex].Layout.Grid.CalcManager)
                    {
                        this.band.Columns[this.columnIndex].Layout.Grid.CalcManager = new UltraCalcManager();
                    }

                    this.ShowFormulaBuilderDialog(this.band.Columns[this.columnIndex] as IFormulaProvider);
                    ////Ends here
                    this.formatChanged            = true;
                    this.flagUnSavedChangesExists = true;
                }
                catch (Exception ex)
                {
                    ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this);
                }
            }
        }
Пример #3
0
 private void ultraTextEditor4_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     if (folderBrowserDialog1.ShowDialog(this) == DialogResult.OK)
     {
         ultraTextEditor4.Text = folderBrowserDialog1.SelectedPath;
     }
 }
Пример #4
0
 private void txtPathBackup_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     _fbdChoosePath.Description         = @"Chọn thư mục lưu file backup";
     _fbdChoosePath.ShowNewFolderButton = true;
     if (_fbdChoosePath.ShowDialog() == DialogResult.OK)
     {
         txtPathBackup.Text = _fbdChoosePath.SelectedPath;
     }
 }
Пример #5
0
 private void Edt_BatchNo_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     if (e.Button.Key.EndsWith("INIT"))
     {
         Edt_BatchNo.Text = GetSign() + DateTime.Today.ToString("yyMM").Substring(1);
         Edt_BatchNo.Select(Edt_BatchNo.Text.Length, 0);
         Edt_BatchNo.Focus();
     }
 }
Пример #6
0
        private void txtMedicamento_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            TicketBL oTicketBL = new TicketBL();
            var      f         = new frmSearchMedicamento();
            var      result    = f.ShowDialog();

            if (result == DialogResult.OK)
            {
                var medicamento = f.MedicamentoSeleccionado;
                if (medicamento == null)
                {
                    return;
                }
                txtMedicamento.Text      = medicamento.NombreCompleto;
                txtMedicamento.Tag       = medicamento.IdProductoDetalle;
                idUnidadProductiva       = medicamento.IdLinea;
                txtUnidadProductiva.Text = medicamento.IdLinea;
                txtPrecio.Text           = medicamento.PrecioVenta.ToString();
                var tienePlan  = false;
                var resultplan = oTicketBL.TienePlan(_protocolId, txtUnidadProductiva.Text);
                if (resultplan.Count > 0)
                {
                    tienePlan = true;
                }
                else
                {
                    tienePlan = false;
                }

                if (tienePlan)
                {
                    if (resultplan[0].i_EsCoaseguro == 1)
                    {
                        #region Conexion SAM
                        ConexionSigesoft conectasam = new ConexionSigesoft();
                        conectasam.opensigesoft();
                        #endregion
                        var           cadena1 = "select PR.r_MedicineDiscount, OO.v_Name, PR.v_CustomerOrganizationId from Organization OO inner join protocol PR On PR.v_AseguradoraOrganizationId = OO.v_OrganizationId where PR.v_ProtocolId ='" + _protocolId + "'";
                        SqlCommand    comando = new SqlCommand(cadena1, connection: conectasam.conectarsigesoft);
                        SqlDataReader lector  = comando.ExecuteReader();
                        string        eps     = "";
                        while (lector.Read())
                        {
                            eps = lector.GetValue(0).ToString();
                        }
                        lector.Close();
                        conectasam.closesigesoft();
                        //calculo nuevo precio
                        txtPPS.Text     = medicamento.d_PrecioMayorista.ToString();
                        txtDctoEPS.Text = eps;
                        decimal nuevoPrecio = decimal.Parse(txtPPS.Text) - ((decimal.Parse(eps) * decimal.Parse(txtPPS.Text)) / 100);
                        txtNuevoPrecio.Text = nuevoPrecio.ToString();
                    }
                }
            }
        }
Пример #7
0
 private void utecInvName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     using (var brm = new Base_Product(true))
     {
         if (brm.ShowDialog() == DialogResult.Yes)
         {
             SetDefaultValue(brm.URow);
         }
     }
 }
Пример #8
0
        private void utxtPassword_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            if (string.IsNullOrEmpty(WmsConstring))
            {
                MessageBox.Show(@"服务器填写错误,或者服务器端未配置正确!", @"注意", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            var bmp = new BaseModifyPwd();

            bmp.ShowDialog();
        }
Пример #9
0
 private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     if (e.Button.Key.Equals("Choose"))
     {
         group.Show();
         mouseHook.Start();
         group.Top  = ControlHelper.GetAbsoluteTop(this);
         group.Left = ControlHelper.GetAbsoluteLeft(this) + this.Width;
         group.BringToFront();
     }
 }
Пример #10
0
        private void uteiWeight_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            if (spMain.IsOpen)
            {
                return;
            }
            try
            {
                spMain.Open();
            }
            catch (Exception ex)
            {
                MessageBox.Show(@"Com1口打开失败
" + ex.Message);
            }
        }
Пример #11
0
 private void Edt_Spec_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     if (_LastSuccess && e.Button.Key.EndsWith("LAST"))
     {
         if (!Edt_Spec.Text.Equals(this._LastSpec))
         {
             Edt_Spec.Text = this._LastSpec;
             Edt_Spec.Focus();
         }
         else
         {
             Edt_Spec.Clear();
             Edt_Spec.Focus();
         }
     }
 }
Пример #12
0
 private void Edt_Length_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     if (_PRODUCELINE != ProduceLine.GX && _LastSuccess && e.Button.Key.EndsWith("LAST"))
     {
         if (!Edt_Length.Text.Equals(this._LastLength))
         {
             Edt_Length.Text = this._LastLength;
             Edt_Length.Focus();
         }
         else
         {
             Edt_Length.Clear();
             Edt_Length.Focus();
         }
     }
 }
Пример #13
0
 private void utecInvName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     using (var brm = new SelectKisInventory(_dtRawMaterial, txtcInvCode.Text, false))
     {
         if (brm.ShowDialog() == DialogResult.Yes)
         {
             _FitemId          = brm.FitemId;
             txtcInvCode.Text  = brm.InvCode;
             utecInvName.Text  = brm.InvName;
             txtcInvStd.Text   = brm.InvStd;
             txtcFullName.Text = brm.FullName;
             _FitemId          = brm.FitemId;
             _DefaultLoc       = brm.DefaultLoc;
             _DefaultSP        = brm.DefalutSP;
             SetLotNoSourceAndRecentVendor();
         }
     }
 }
Пример #14
0
        private void txtSearch_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            switch (e.Button.Key)
            {
            case "Search":
                if (Search != null)
                {
                    Search(sender, e);
                }
                break;

            case "Clear":
                if (Clear != null)
                {
                    Clear(sender, e);
                }
                break;
            }
        }
Пример #15
0
 private void cboInventoryItemCategory_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     dsDictionary.Customer.AcceptChanges();
     using (var fDetail = new FrmCustomerDetail())
     {
         fDetail.FormActionMode = ActionMode.AddNew;
         fDetail.DsDictionary   = dsDictionary;
         fDetail.BsDetail       = bsCustomer;
         fDetail.objBLDetail    = new BLCustomer();
         if (fDetail.ShowDialog() != DialogResult.OK)
         {
             dsDictionary.Customer.RejectChanges();
         }
         else
         {
             dsDictionary.Customer.AcceptChanges();
             cboCustomerID.Value = ((Desktop.Entity.DictionaryDataSet.CustomerRow)((System.Data.DataRowView)bsCustomer.Current).Row).CustomerID;
         }
     }
 }
Пример #16
0
        private void utxtPassword_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            try
            {
                var ws = new WmsService.BaseConService {
                    Url = "http://" + utxtServer.Text + "/BaseConService.asmx"
                };

                BaseStructure.WmsServer     = utxtServer.Text;
                BaseStructure.WmsCon        = ws.GetWmsConstring();
                BaseStructure.WmsServiceUri = ws.Url;
                BaseStructure.KisConstring  = ws.GetKisConstring();
            }
            catch (Exception ex)
            {
                MessageBox.Show(@"服务器填写错误,或者服务器端未配置正确!
" + ex.Message, @"注意", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            var bmp = new BaseModifyPwd();

            bmp.ShowDialog();
        }
Пример #17
0
 private void txtPathBackup_EditorButtonClick(object sender,
                                              Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     try
     {
         var openfiledialog = new OpenFileDialog
         {
             Filter          = @"Excel Files|*.bak;*bak",
             Multiselect     = false,
             Title           = @"Chọn file bak",
             CheckFileExists = true,
             CheckPathExists = true
         };
         if (openfiledialog.ShowDialog() == DialogResult.OK)
         {
             _str = openfiledialog.FileName;
             txtPathBackup.Text = _str;
         }
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
 /// <summary>
 /// Handles the EditorButtonClick event of the llDateNavigation control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Infragistics.Win.UltraWinEditors.EditorButtonEventArgs"/> instance containing the event data.</param>
 private void llDateNavigation_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     this.NavigateSchedule(this.tcOrders.SelectedTab.Key, (e.Button.Key == "Next"));
 }
Пример #19
0
 private void uneCantidad_AfterEditorButtonCloseUp(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
 }
Пример #20
0
 private void TXT_Name_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     TXT_Name.Focus();
 }