示例#1
0
 private void gvLocationProduct_CellClick(object sender, Resco.Controls.SmartGrid.CellEventArgs e)
 {
     //click on delete column
     if (e.Cell.ColumnIndex == 2)
     {
         if (GlobalMessageBox.ShowQuestion("คุณต้องลบรายการ ใช่หรือไม่") == DialogResult.Yes)
         {
             var locationCode = gvLocationProduct.Cells[e.Cell.RowIndex, 0].Text;
             LocationCheckProductManager.Delete(locationCode);
             this.BindGrid();
         }
     }
 }
示例#2
0
 private void gvLocationProduct_CellClick(object sender, Resco.Controls.SmartGrid.CellEventArgs e)
 {
     //click on delete column
     if (e.Cell.ColumnIndex == 2)
     {
         if (GlobalMessageBox.ShowQuestion("คุณต้องลบรายการ ใช่หรือไม่") == DialogResult.Yes)
         {
             var id = Convert.ToInt32(gvLocationProduct.Cells[e.Cell.RowIndex, 3].Text);
             Delete(id);
             this.BindGrid();
         }
     }
 }
示例#3
0
 private void grdLocations_CellClick(object sender, Resco.Controls.SmartGrid.CellEventArgs e)
 {
     //click on delete column
     if (e.Cell.ColumnIndex == 2)
     {
         if (GlobalMessageBox.ShowQuestion("คุณต้องลบรายการ ใช่หรือไม่") == DialogResult.Yes)
         {
             var id = Convert.ToInt32(grdLocations.Cells[e.Cell.RowIndex, 0].Text);
             _labelLocation.RemoveAll(p => p.Id == id);
             this.BindGridview();
         }
     }
 }
 private void smartGrid_CellClick(object sender, Resco.Controls.SmartGrid.CellEventArgs e)
 {
     if (IsUsePosition)
     {
         try
         {
             var PCode = smartGrid.Rows[smartGrid.SelectedCell.RowIndex]["Unitcode"].ToString();
             for (int i = 0; i < smartGrid.Rows.Count; i++)
             {
                 smartGrid.Rows[i]["Chk"] = smartGrid.Rows[i]["Unitcode"] == PCode;
                 smartGrid.UpdateLayout();
             }
         }
         catch (Exception)
         {
         }
     }
 }
示例#5
0
        private void grdForkLift_CellClick(object sender, Resco.Controls.SmartGrid.CellEventArgs e)
        {
            try
            {
                var forklifts = (List <ForkLift>)bindingSourceForklift.DataSource;
                foreach (var item in forklifts)
                {
                    item.IsSelected = false;
                }

                var forklift = forklifts.Find(p => p.ForkliftNumber == grdForkLift.Cells[e.Cell.RowIndex, 1].Text);
                if (forklift != null)
                {
                    forklift.IsSelected = true;
                }

                bindingSourceForklift.ResetBindings(false);
            }
            catch (Exception ex)
            { GlobalMessageBox.ShowError(ex); }
        }
 private void gvLocationProduct_CellClick(object sender, Resco.Controls.SmartGrid.CellEventArgs e)
 {
     //click on delete column
     if (e.Cell.ColumnIndex == 2)
     {
         if (GlobalMessageBox.ShowQuestion("คุณต้องลบรายการ ใช่หรือไม่") == DialogResult.Yes)
         {
             var locationCode = gvLocationProduct.Cells[e.Cell.RowIndex, 0].Text;
             using (SqlCeConnection con = new SqlCeConnection(SqlHelper.SqlCeConnectionString))
             {
                 con.Open();
                 using (SqlCeCommand com = new SqlCeCommand(SqlHelper.GetSql(30), con))
                 {
                     com.Parameters.AddWithValue("@LocationCode", locationCode);
                     com.Parameters.AddWithValue("@CreatedBy", GlobalContext.UserCode);
                     com.ExecuteNonQuery();
                 }
             }
             this.BindGrid();
         }
     }
 }
 private void grdLocations_CellClick(object sender, Resco.Controls.SmartGrid.CellEventArgs e)
 {
 }