Ejemplo n.º 1
0
        public List <FGPicking> GetPickingDetailList(FGPicking baseFGPicking)
        {
            List <FGPicking> collections = new List <FATHBarcode.Model.Object.FGPicking>();
            var script =
                @"SELECT [Part No.], [Location], [Tag No.], [Qty.] FROM FGPicking WHERE [Delivery Order Tag] = @DELIVERYORDERTAG AND [Part No.] = @PARTNO";

            using (var conn = dbConnect.GetConnection())
            {
                conn.Open();
                using (var cmd = new SqlCeCommand(script, conn))
                {
                    cmd.Parameters.Add("DELIVERYORDERTAG", baseFGPicking["Delivery Order Tag"]);
                    cmd.Parameters.Add("PARTNO", baseFGPicking["Part No."]);
                    var reader = cmd.ExecuteReader();
                    while (reader.Read())
                    {
                        var fgPicking = new FGPicking();
                        fgPicking["Delivery Order Tag"] = baseFGPicking["Delivery Order Tag"];
                        fgPicking["Location"]           = reader["Location"];
                        fgPicking["Part No."]           = reader["Part No."];
                        fgPicking["Tag No."]            = reader["Tag No."];
                        fgPicking["Qty."] = reader["Qty."];
                        collections.Add(fgPicking);
                    }
                }
            }
            return(collections);
        }
Ejemplo n.º 2
0
 private void fgPickingDataGrid_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         var fgPicking = new FATHBarcode.Model.Object.FGPicking();
         fgPicking["Delivery Order Tag"] = deliveryOrderTagTextbox.Text;
         fgPicking["Part No."]           = fgPickingDataGrid[fgPickingDataGrid.CurrentCell.RowNumber, 1].ToString();
         var view       = new FGPickingDetail();
         var repository = new FATHBarcode.Model.Object.FGPickingRepository();
         var presenter  = new Presenter.FGPickingDetailPresenter(view, repository, fgPicking, Presenter.Screen);
         view.ShowDialog();
         if (presenter.DeleteFrag)
         {
             Presenter.UpdateAllQty();
         }
     }
 }
Ejemplo n.º 3
0
        public int RemoveFATHTag(FGPicking fGPicking)
        {
            var script =
                @"DELETE FROM FATHTag
                WHERE ([Delivery Order Tag] = @DELIVERYORDERTAG) AND ([Part No.] = @PARTNO) AND ([Tag No.] = @TAGNO)";

            using (var conn = dbConnect.GetConnection())
            {
                conn.Open();
                using (var cmd = new SqlCeCommand(script, conn))
                {
                    cmd.Parameters.Add("DELIVERYORDERTAG", fGPicking["Delivery Order Tag"].ToString());
                    cmd.Parameters.Add("PARTNO", fGPicking.PartNo);
                    cmd.Parameters.Add("TAGNO", fGPicking.TagNo);
                    return(cmd.ExecuteNonQuery());
                }
            }
        }