private void InitRecord()
 {
     Cursor.Current = Cursors.WaitCursor;
     packingBindingSource.DataSource = PackingManager.GetAll();
     unitBindingSource.DataSource    = UnitManager.GetAll();
     Cursor.Current = Cursors.Default;
 }
Beispiel #2
0
    public void PutOnTruck()
    {
        Debug.Log("PutOnTruck");

        transform.position = GameAssets.instance.UnitPosition[5].position;
        //PackingManager _packingManager = packingManager.GetComponent<PackingManager>();
        //Transform t = packingManagerScript.GetNextFreeSlot();
        PackingManager packingManagerScript = GameObject.Find("PackedPositions").GetComponent <PackingManager>();
        Transform      nextFreeSlot         = packingManagerScript.GetNextFreeSlot();

        //Debug.Log("Next Free Slot = " + nextFreeSlot);

        transform.position = new Vector2(nextFreeSlot.position.x, transform.position.y);

        //packingManagerScript
        //Debug.Log("Transform  ", packingManagerScript);
        //Transform slot = packingManagerScript.GetNextFreeSlot();



        //transform.position = new Vector2(nextFreeSlot.position.x, transform.position.y);


        rb.velocity      = new Vector2(0, 0);
        rb.gravityScale  = gravity;
        isCooking        = false;
        isOnConveyorBelt = false;
        isAlive          = false;

        GameManager.instance.AddCakesPacked();
    }
Beispiel #3
0
        private void DeletePacking()
        {
            if (packingBindingSource == null)
            {
                return;
            }
            var dResult = MessageBox.Show(@"Delete current record?", @"Delete", MessageBoxButtons.YesNo,
                                          MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);

            if (dResult == DialogResult.Yes)
            {
                if (PackingManager.Delete(((Packing)packingBindingSource.Current).PackingId))
                {
                    MessageBox.Show(@"Record was deleted successfully.", @"Delete", MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                    packingBindingSource.RemoveCurrent();
                }
                else
                {
                    MessageBox.Show(@"Error on delete operation.", @"Delete", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                    packingDataGridView.Focus();
                }
            }
        }
Beispiel #4
0
 private void InitRecords()
 {
     Cursor.Current = Cursors.WaitCursor;
     categoryBindingSource.DataSource   = CategoryManager.GetAll();
     unitBindingSource.DataSource       = UnitManager.GetAll();
     drugTypeBindingSource.DataSource   = DrugTypeManager.GetAll();
     packingBindingSource.DataSource    = PackingManager.GetAll();
     voidReasonBindingSource.DataSource = VoidReasonManager.GetAll();
     Cursor.Current = Cursors.Default;
 }
Beispiel #5
0
        private void InitRecord()
        {
            Cursor.Current = Cursors.WaitCursor;
            supplierBindingSource.DataSource = SupplierManager.GetAll();
            categoryBindingSource.DataSource = CategoryManager.GetAll();
            unitBindingSource.DataSource     = UnitManager.GetAll();
            drugTypeBindingSource.DataSource = DrugTypeManager.GetAll();
            packingBindingSource.DataSource  = PackingManager.GetAll();

            _listProducts = ProductManager.GetAll();
            productBindingSource.DataSource = _listProducts;
            Cursor.Current = Cursors.Default;
        }
Beispiel #6
0
        private void packingDataGridView_RowLeave(object sender, DataGridViewCellEventArgs e)
        {
            if (packingBindingSource == null)
            {
                return;
            }
            if (packingDataGridView.Rows.Count <= 1)
            {
                return;
            }
            if (!packingDataGridView.IsCurrentRowDirty)
            {
                return;
            }
            Validate();
            packingBindingSource.EndEdit();
            var iResult = PackingManager.Save((Packing)packingBindingSource.Current);

            toolStripStatusLabel1.Text = iResult > 0 ? @"Packing saved successfully." : @"Error occurred when saving Unit.";
        }
        public ActionResult Index(EnquiryViewModel eViewModel)
        {
            ViewBag.Title = "KPCL ERP :: Create, Update";

            PackingManager pMan = new PackingManager();

            PaginationInfo pager = new PaginationInfo();

            pager.IsPagingRequired = false;

            try
            {
                eViewModel.Packing = pMan.Get_Packings(ref pager);
            }
            catch (Exception ex)
            {
                eViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Enquiry Controller - Index " + ex.ToString());
            }

            return(View("Index", eViewModel));
        }
 public PackingController()
 {
     _packingMan = new PackingManager();
 }