Beispiel #1
0
 private void dgvDatos_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     Inventarios.Conteos.frmConteoFisico formulario
         = new  Conteos.frmConteoFisico(Convert.ToInt32(dgvDatos.ActiveRow.Cells["Folio"].Value));
     formulario.MdiParent = this.MdiParent;
     formulario.Show();
 }
Beispiel #2
0
        private void dgvDatos_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            try
            {
                if (e.Cell.Row.Index > -1 && e.Cell.Column.Header.Caption.Equals("Asignado"))
                {
                    using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionLog))
                    {
                        using (SqlCommand command = new SqlCommand("su_Almacen", connection))
                        {
                            command.CommandType = CommandType.StoredProcedure;
                            command.Parameters.AddWithValue("@TipoConsulta", 3);
                            command.Parameters.AddWithValue("@DocEntry", dgvDatos.Rows[e.Cell.Row.Index].Cells["DocEntry"].Value);
                            command.Parameters.AddWithValue("@Asignado", dgvDatos.Rows[e.Cell.Row.Index].Cells["IdAlmacenista"].Value);
                            command.Parameters.AddWithValue("@UserID", ClasesSGUV.Login.Id_Usuario);

                            connection.Open();
                            command.ExecuteNonQuery();
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Beispiel #3
0
        private void ugBadAction_w_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            if (e.Cell.Text == "取消提醒")
            {
                DialogResult dr = MessageBox.Show(this, "确定要取消此提醒?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                if (dr == DialogResult.Yes)
                {
                    BloodGas bg = new BloodGas();
                    bg.PID       = int.Parse(ugBadAction_w.ActiveRow.Cells["ID"].Text);
                    bg.Period    = int.Parse(ugBadAction_w.ActiveRow.Cells["Period"].Text);
                    bg.pH        = "-1";
                    bg.PaO2      = "-1";
                    bg.SaO2      = "-1";
                    bg.PaCO2     = "-1";
                    bg.RealHCO3  = "-1";
                    bg.StandHCO3 = "-1";
                    bg.AB        = "-1";
                    bg.BE        = "-1";
                    bg.AG        = "-1";
                    bg.CheckDate = DateTime.MinValue;
                    Maticsoft.BLL.BloodGas bll = new Maticsoft.BLL.BloodGas();
                    bll.SaveOrUpdate(bg);

                    ugBadAction_w.ActiveRow.Delete(false);//删除所选行
                }
            }
            if (e.Cell.Text == "填写数据")
            {
                int             pid        = int.Parse(ugBadAction_w.ActiveRow.Cells["ID"].Text);
                int             period     = int.Parse(ugBadAction_w.ActiveRow.Cells["Period"].Text);
                AfterTreatTrace openDialog = new AfterTreatTrace(pid, period);
                openDialog.ShowDialog();
                BindTraceList();
            }
        }
Beispiel #4
0
 private void dgvVideos_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     try
     {
         if (e.Cell.Row.Index > -1 && e.Cell.Band.Index == 0)
         {
             if (e.Cell.Column.Index == 4)
             {
                 System.Diagnostics.Process.Start(dgvVideos.Rows[e.Cell.Row.Index].Cells[0].Value.ToString());
             }
             else if (e.Cell.Column.Index == 5)
             {
                 DialogResult r = folderBrowserDialog1.ShowDialog();
                 if (r == System.Windows.Forms.DialogResult.OK)
                 {
                     System.IO.File.Copy(dgvVideos.Rows[e.Cell.Row.Index].Cells[0].Value.ToString(), folderBrowserDialog1.SelectedPath + "\\" + dgvVideos.Rows[e.Cell.Row.Index].Cells[1].Value.ToString());
                 }
             }
         }
     }
     catch (Exception)
     {
         MessageBox.Show("El archivo no esta disponible.");
     }
 }
Beispiel #5
0
 private void tBL_EducationUltraGrid_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     if (vFormMode.Trim().ToUpper() == "NI")
     {
         vFormMode = "U";
     }
 }
Beispiel #6
0
        private void main_ultraGrid_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            int detailID = (int)e.Cell.Row.Cells[Form_task21_sec.ID_colName].Value;

            if (e.Cell.Value.Equals(Form_task21_sec.edit_colName))
            {
                Form_task21_detail detailForm = new Form_task21_detail(this.secID, detailID);
                this.Pop_detailForm(detailForm);
            }
            else if (e.Cell.Value.Equals(Form_task21_sec.del_colName))
            {
                if (MessageBox.Show("Are you sure to Delete Task " + detailID + "?", "Msg", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    Task21_security detail = new Task21_security(detailID);
                    if (detail == null)
                    {
                        return;
                    }

                    detail.Delete_from_DB();
                    Task21_secMaster.Reset();
                    this.Refresh_parentUI();
                    this.BindData();
                }
            }
        }
Beispiel #7
0
 private void dgvDatos_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     if (e.Cell.Row.Index > -1)
     {
         Conteos.frmConteoFisico form = new frmConteoFisico(Convert.ToInt32(dgvDatos.Rows[e.Cell.Row.Index].Cells["Folio"].Value));
         form.Show();
     }
 }
Beispiel #8
0
        /*---------------------------------------------------------------------------------------------------------------------------------------*/

        private void main_ultraGrid_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            int detail_id = (int)e.Cell.Row.Cells["ID"].Value;

            Hss_DailyJobs td = new Hss_DailyJobs(detail_id);

            td.Init_from_DB();
            Models_viewForm mvf = td.GetEditForm();

            mvf.Refresh_parentUI = this.RefreshMainGrid;
            mvf.Show();
        }
Beispiel #9
0
 private void dgvDatos_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     if (dgvDatos.ActiveRow != null)
     {
         Object[] valuesOut = new Object[] { };
         connection.Ejecutar("LOG",
                             "sp_ListaPrecios",
                             new string[] { },
                             new string[] { "@TipoConsulta", "@ItemCode", "@FactorT", "@FactorM", "@FactorV", "@Volumen" },
                             ref valuesOut, 10, dgvDatos.ActiveRow.Cells["ItemCode"].Value, dgvDatos.ActiveRow.Cells["FFMT"].Value, dgvDatos.ActiveRow.Cells["FFMM"].Value, dgvDatos.ActiveRow.Cells["FFV"].Value, dgvDatos.ActiveRow.Cells["V"].Value);
     }
 }
Beispiel #10
0
        private void ultraGrid2_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            int    col     = 0;
            string Columna = "";

//            e.Cell.Row.Cells.GetItem(0);

            //char.IsNumber


            //int x=0;
            //for ( x=0;x<e.Cell.Value.ToString().Length;x++ )
            // //e.Cell.Value.ToString()
            //{
            //    char.IsNumber(e.Cell.Value.ToString().Substring(x, 1));

            //}


            if (e.Cell.Column.Key.ToString().ToUpper() == "CANTIDAD")
            {
                if (Entra > 0)
                {
                    //e.Cell.Value = "";
                    e.Cell.Value = "";
                    MessageBox.Show("No puede actualizar los datos...");
                    return;
                }
            }

            Columna = e.Cell.Column.Key.ToString().ToUpper();


            foreach (Infragistics.Win.UltraWinGrid.UltraGridRow Rn in ultraGrid2.Rows)
            {
                if (Rn.Cells[0].Value.ToString() != "" && Rn.Cells[1].Value.ToString() != "" && Rn.Cells[2].Value.ToString() != "" && Rn.Cells[3].Value.ToString() != "" && Rn.Cells[4].Value.ToString() != "")
                {
                    ClsKit.AddNewRowArtKitMan(1, Convert.ToInt32(Rn.Cells[0].Value), Convert.ToString(Rn.Cells[1].Value).ToUpper(), Convert.ToString(Rn.Cells[2].Value).ToUpper(), Convert.ToInt32(Rn.Cells[3].Value), Convert.ToDouble(Rn.Cells[4].Value));
                }
            }

            if (Columna == "PRECIOU")
            {
                ClsKit.AddNewRowArtKitMan(3, 0, "", "", 0, 0);
                ListKit = ClsKit.ListArtKit();
                ultraGrid2.DataSource = ListKit;
                int rows = 0;
                rows = ultraGrid2.Rows.Count;
                ultraGrid2.Rows[rows - 1].Cells[1].Activated = true;
                //e.Cell.Activated = true;
            }
        }
Beispiel #11
0
 private void ultraGridBOM_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     if (e.Cell.Column.ToString() == "CommodityCode")
     {
         if (e.Cell.Text == "SHEET METAL")
         {
             e.Cell.Row.Appearance.BackColor = Color.LightBlue;
         }
         else
         {
             e.Cell.Row.Appearance.BackColor = Color.LightPink;
         }
     }
 }
Beispiel #12
0
 private void dgvEntregas_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     if (e.Cell.Row.Index > -1 && e.Cell.Band.Index == 0)
     {
         if (e.Cell.Column.Header.Caption == "")
         {
             Constantes.Clases.LoadRPT rpt  = new Constantes.Clases.LoadRPT(20011);
             Constantes.frmVisor       form = new Constantes.frmVisor(rpt.DocRPT);
             //rpt.GenerarPDF(dgvEntregas.Rows[e.Cell.Row.Index].Cells["DocEntry"].Value.ToString());
             rpt.Print(dgvEntregas.Rows[e.Cell.Row.Index].Cells["DocEntry"].Value.ToString());
             //form.Show();
         }
     }
 }
Beispiel #13
0
        void ugdList_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            if (e.Cell.Column.CellButtonAppearance.Tag.ToString() == "选择路径")
            {
                this.fbdFile.ShowDialog();
                if (!string.IsNullOrEmpty(this.fbdFile.SelectedPath))
                {
                    e.Cell.Row.Cells["backup"].Value = this.fbdFile.SelectedPath + @"\" + e.Cell.Row.Cells["name"].Value + ".bak";
                }
                else
                {
                    return;
                }
            }
            else if (e.Cell.Column.CellButtonAppearance.Tag.ToString() == "操作")
            {
                var isok = MessageBox.Show("确定备份?", "提示", MessageBoxButtons.OKCancel);
                if (isok == System.Windows.Forms.DialogResult.OK)
                {
                    if (string.IsNullOrEmpty(e.Cell.Row.Cells["backup"].Value.ToString()))
                    {
                        MessageBox.Show("请选择地址!");
                        return;
                    }
                    else if (File.Exists(e.Cell.Row.Cells["backup"].Value.ToString()))
                    {
                        if (MessageBox.Show("该文件已存在!是否将它覆盖?", "提示", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.Cancel)
                        {
                            return;
                        }
                    }
                    string sql = string.Format(@"BACKUP DATABASE {0} TO DISK ='{1}'", e.Cell.Row.Cells["name"].Value, e.Cell.Row.Cells["backup"].Value);
                    DBHelp.ExecuteNonQuery(sql);

                    if (File.Exists(e.Cell.Row.Cells["backup"].Value.ToString()))
                    {
                        MessageBox.Show("备份成功");
                    }
                    else
                    {
                        MessageBox.Show("备份失败");
                    }
                }
                else
                {
                    return;
                }
            }
        }
Beispiel #14
0
        private void main_ultraGrid_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            if (e.Cell.Value.ToString().Equals("Open", StringComparison.InvariantCultureIgnoreCase))
            {
                if (this.remoteSource == null)
                {
                    return;
                }
                string fileName = "'" + e.Cell.Row.Cells["Name"].Value.ToString() + "'";

                if (this.svFileDia.ShowDialog() == DialogResult.OK)
                {
                    FileStream fs = new FileStream(this.svFileDia.FileName, FileMode.Create);
                    this.remoteSource.DownloadFile(fileName, fs);
                    fs.Close();
                }
            }
        }
Beispiel #15
0
        private void dgvDatos_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            using (SqlConnection connection = new SqlConnection(Datos.Clases.Constantes.conectionLog))
            {
                using (SqlCommand command = new SqlCommand("su_Almacen", connection))
                {
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@TipoConsulta", 21);
                    command.Parameters.AddWithValue("@DocEntry", dgvDatos.ActiveRow.Cells["DocEntry"].Value);
                    command.Parameters.AddWithValue("@ObjType", dgvDatos.ActiveRow.Cells["ObjType"].Value);
                    command.Parameters.AddWithValue("@UserId", ClasesSGUV.Login.Id_Usuario);
                    command.Parameters.AddWithValue("@Comentarios", dgvDatos.ActiveRow.Cells["Comentarios recepción"].Value);

                    connection.Open();
                    command.ExecuteNonQuery();
                }
            }
        }
Beispiel #16
0
        private void dgvDatos_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            if (e.Cell.Row.Index > -1 && e.Cell.Band.Index == 0)
            {
                if (e.Cell.Column.Header.Caption == "Quitar")
                {
                    // if (!dgvDatos.Rows[e.Cell.Row.Index].Cells["Estatus"].Value.ToString().Equals("Surtido"))
                    //     return;

                    Almacen.Entregas.frmMensaje frm = new frmMensaje();

                    if (frm.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
                    {
                        SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionLog);
                        {
                            using (SqlCommand command = new SqlCommand("su_Almacen", connection))
                            {
                                command.CommandType = CommandType.StoredProcedure;
                                command.Parameters.AddWithValue("@TipoConsulta", 8);
                                command.Parameters.AddWithValue("@DocEntry", dgvDatos.Rows[e.Cell.Row.Index].Cells["DocEntry"].Value);
                                command.Parameters.AddWithValue("@Facturas", frm.Folios);

                                connection.Open();
                                command.ExecuteNonQuery();

                                btnConsultar_Click(sender, e);
                            }
                        }
                    }
                }
            }
            //if (e.Cell.Row.Index > -1 && e.Cell.Band.Index == 0)
            //{
            //    if (e.Cell.Column.Header.Caption == "Imprimir")
            //    {
            //        Constantes.Clases.LoadRPT rpt = new Constantes.Clases.LoadRPT(20011);
            //        Constantes.frmVisor form = new Constantes.frmVisor(rpt.DocRPT);
            //        rpt.Print(dgvDatos.Rows[e.Cell.Row.Index].Cells["DocEntry"].Value.ToString());
            //        //form.MdiParent = this.MdiParent;
            //        //form.Show();
            //    }
            //}
        }
Beispiel #17
0
        private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            ultraGrid1.UpdateData();
            switch (e.Cell.Column.Key)
            {
            case "FILTERORG":
                if (Convert.ToBoolean(e.Cell.Value))
                {
                    e.Cell.Row.Cells["FILTERUSER"].Value = "false";
                }
                break;

            case "FILTERUSER":
                if (Convert.ToBoolean(e.Cell.Value))
                {
                    e.Cell.Row.Cells["FILTERORG"].Value = "false";
                }
                break;
            }
        }
Beispiel #18
0
        private void dgvDatos_AfterCellListCloseUp(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            try
            {
                if (e.Cell.Column.Index > -1)
                {
                    if (e.Cell.Column.Key.Equals("Asignado"))
                    {
                        if (udbAlmacenistas.SelectedRow.Cells["ID"].Value != DBNull.Value)
                        {
                            dgvDatos.Rows[e.Cell.Row.Index].Cells["IdAlmacenista"].Value = udbAlmacenistas.SelectedRow.Cells["ID"].Value.ToString();

                            dgvDatos.Rows[e.Cell.Row.Index].Cells["Estatus"].Value = "Proceso de surtido";
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Beispiel #19
0
        private void dgvDatos_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            try
            {
                decimal PFT = decimal.Zero, PFM = decimal.Zero;
                PFT = Convert.ToDecimal((Convert.ToDecimal(dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMT"].Value) != 0 ? dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMT"].Value : DBNull.Value) == DBNull.Value ? dgvDatos.Rows[e.Cell.Row.Index].Cells["POMT"].Value : dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMT"].Value);
                PFM = Convert.ToDecimal((Convert.ToDecimal(dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMM"].Value) != 0 ? dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMM"].Value : DBNull.Value) == DBNull.Value ? dgvDatos.Rows[e.Cell.Row.Index].Cells["POMM"].Value : dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMM"].Value);

                PFT = Math.Truncate(PFT * 100) / 100;
                PFM = Math.Truncate(PFM * 100) / 100;

                //PFM = Convert.ToDecimal(dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMM"].Value == DBNull.Value ? dgvDatos.Rows[e.Cell.Row.Index].Cells["POMM"].Value : dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMM"].Value);

                #region Validacion 1
                if (PFM <= PFT)
                {
                    dgvDatos.Rows[e.Cell.Row.Index].Cells["Validación 1"].Value = "VERDADERO";
                }
                else
                {
                    dgvDatos.Rows[e.Cell.Row.Index].Cells["Validación 1"].Value = "FALSO";
                }
                #endregion

                #region PRECIOS FINALES
                //decimal? FFT, FFM, FFV, CB;
                //FFT = (decimal?)(dgvDatos.Rows[e.Cell.Row.Index].Cells["FFMT"].Value == DBNull.Value ? null : dgvDatos.Rows[e.Cell.Row.Index].Cells["FFMT"].Value);
                //FFM = (decimal?)(dgvDatos.Rows[e.Cell.Row.Index].Cells["FFMM"].Value == DBNull.Value ? null : dgvDatos.Rows[e.Cell.Row.Index].Cells["FFMM"].Value);
                //FFV = (decimal?)(dgvDatos.Rows[e.Cell.Row.Index].Cells["FFV"].Value == DBNull.Value ? null : dgvDatos.Rows[e.Cell.Row.Index].Cells["FFV"].Value);
                //CB = (decimal?)(dgvDatos.Rows[e.Cell.Row.Index].Cells["CB"].Value == DBNull.Value ? null : dgvDatos.Rows[e.Cell.Row.Index].Cells["CB"].Value);

                //dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMT"].Value = FFT == null ? DBNull.Value : FFT * CB;
                //dgvDatos.Rows[e.Cell.Row.Index].Cells["PFMM"].Value = FFM == null ? DBNull.Value : FFM * CB;
                //dgvDatos.Rows[e.Cell.Row.Index].Cells["PFV"].Value = FFV == null ? DBNull.Value : FFV * CB;
                #endregion
            }
            catch (Exception)
            {
            }
        }
Beispiel #20
0
        private void dgvLotes_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            try
            {
                dgvLotes.Rows[e.Cell.Row.Index].Cells["ID"].Value = dgvDatos.ActiveRow.Cells["ID"].Value;

                if (e.Cell.Column.Index == 1) //si es columna de lotes, valida existencia del Lote, si existe llenar campos Aduana|Pedimento|Fecha
                {
                    if (!string.IsNullOrEmpty(e.Cell.Value.ToString()))
                    {
                        DataTable tbl = this.Lotes(dgvDatos.ActiveRow.Cells["ItemCode"].Value.ToString(), e.Cell.Value.ToString());

                        if (tbl.Rows.Count > 0)
                        {
                            if (MessageBox.Show("Lote ya existe. ¿Continuar?", "HalcoNET", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
                                == System.Windows.Forms.DialogResult.Yes)
                            {
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Pedimento"].Value         = tbl.Rows[0]["MnfSerial"];
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Aduana"].Value            = tbl.Rows[0]["LotNumber"];
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Fecha de admisión"].Value = tbl.Rows[0]["InDate"];

                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Pedimento"].Activation         = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Aduana"].Activation            = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Fecha de admisión"].Activation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
                            }
                            else
                            {
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Pedimento"].Activation         = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Aduana"].Activation            = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
                                dgvLotes.Rows[e.Cell.Row.Index].Cells["Fecha de admisión"].Activation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Beispiel #21
0
        private void gDatos_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            try
            {
                if (e.Cell.Column.Key == "MOV")
                {
                    d = SQL.Query("update History set MOV='" + e.Cell.Value.ToString() + "' where ID='" + e.Cell.Row.Cells["ID"].Value.ToString() + "'").ExecuteReader();
                    d.Read();
                    SQL.command.Connection.Close();
                }

                if (e.Cell.Column.Key == "Status")
                {
                    d = SQL.Query("update History set Status='" + e.Cell.Value.ToString() + "' where ID='" + e.Cell.Row.Cells["ID"].Value.ToString() + "'").ExecuteReader();
                    d.Read();
                    SQL.command.Connection.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #22
0
        private void uGridProBoxBarCode_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            if (e.Cell.Row.Index < 0)
            {
                return;
            }

            var cOrderNumber = e.Cell.Row.Cells["cOrderNumber"].Value.ToString();
            var cState       = e.Cell.Row.Cells["cState"].Value.ToString();

            if (!cState.Equals("完成"))
            {
                MessageBox.Show(@"订单必需是完成状态,才允许操作");
                return;
            }
            var wf     = new WmsFunction(BaseStructure.WmsCon);
            var lotCmd = new SqlCommand("GenerateWmsEas")
            {
                CommandType = CommandType.StoredProcedure
            };

            lotCmd.Parameters.AddWithValue("@cOrderNumber", cOrderNumber);
            lotCmd.Parameters.AddWithValue("@cType", "销售出库");
            lotCmd.Parameters.AddWithValue("@cGuid", Guid.NewGuid());
            lotCmd.Parameters.AddWithValue("@bReUpdate", 1);
            if (wf.ExecSqlCmd(lotCmd))
            {
                MessageBox.Show(@"写入中间表成功");
            }
            else
            {
                MessageBox.Show(@"写入中间表失败,或未包含需要更新的单据前缀");
            }
            pageListMain.Constr = BaseStructure.WmsCon;
            pageListMain.GetRecord();
        }
Beispiel #23
0
        private void ugBTS_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            int    auto_id   = 0;
            string reference = "";
            string status    = "";

            if (e.Cell.Column.Index == 1 || e.Cell.Column.Index == 20)
            {
                //  if (this.ugBTS.Selected.Rows.Count > 0)
                //  {
                auto_id   = Convert.ToInt32(e.Cell.Row.Cells["auto_id"].Value.ToString().Trim());
                status    = e.Cell.Row.Cells["status"].Value.ToString().Trim();
                reference = e.Cell.Row.Cells["reference"].Value.ToString().Trim();
                string        qry = "update dbo.BTS_GoogleIntInvTran set status='" + status + "', reference='" + reference + "'   where auto_id=" + auto_id;
                SqlConnection cn  = new SqlConnection(constr);
                cn.Open();
                SqlCommand     cmd = new SqlCommand(qry, cn);
                SqlDataAdapter da  = new SqlDataAdapter(cmd);
                DataSet        ds  = new DataSet();
                da.Fill(ds);
                cn.Close();
                // }
            }
        }
Beispiel #24
0
 private void main_ultraGrid_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     this.selected_dvdIndex = (int)e.Cell.Value;
     this.Close();
 }
Beispiel #25
0
 private void ultraGrid2_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
 }
Beispiel #26
0
 private void Grid_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     this.Update();
 }