Пример #1
0
        public ActionResult Transfer2(TransferForm form)
        {
            var currentUser = _users.Single(n => n.Username == UserContext.Current.Username);
            var targetUser  = _users.Single(n => n.Username == form.TargetUser);

            currentUser.Account -= form.Amount;
            targetUser.Account  += form.Amount;

            var data = JsonConvert.SerializeObject(_users);

            System.IO.File.WriteAllText(_dataPath, data);
            return(Json(true));
        }
Пример #2
0
        public IActionResult CreateTransfer([FromBody] TransferForm form)
        {
            var error = new Error();


            var transferId = _transferManager.AddTransfer(form.MapToCore(), ref error);

            if (error.ErrorCode != ErrorCode.OKAY)
            {
                return(BadRequest(error.Message));
            }

            return(Ok(transferId));
        }
Пример #3
0
 public override void StartUp()
 {
     if (this._form == null)
     {
         this._form              = new TransferForm();
         this._form.FormClosing += delegate(object sender, FormClosingEventArgs e)
         {
             this._form = null;
         };
         _form.StartPosition = FormStartPosition.CenterScreen;
     }
     if (this._form.WindowState == FormWindowState.Minimized)
     {
         this._form.WindowState = FormWindowState.Normal;
     }
     this._form.Show();
     this._form.BringToFront();
 }
Пример #4
0
        /// <summary>
        /// Loads a form to the panel
        /// </summary>
        /// <param name="tag">The tag of the button - Here is stored what type of form is supposed to be opened</param>
        private void LoadForm(string tag)
        {
            var yEnd = new YearEnd();

            if (yEnd.InventoryRequired(false))
            {
                switch (VisibilitySetting.HandleUnits)
                {
                case 1:
                    yEnd.GenerateAutomaticInventory();
                    break;

                case 2:
                    yEnd.GenerateAutomaticInventoryByUnit();
                    break;

                case 3:
                    yEnd.GenerateAutomaticInventoryByUnit();
                    break;
                }
            }

            Form frm;

            switch (tag)
            {
            case "Receives":
                frm = new ReceivingForm();
                AddTab("Receiving Form", frm);
                break;

            case "Issues":
                frm = new IssueForm();
                AddTab("Issue Form", frm);
                break;

            case "AMCs":
                frm = new AMCView();
                AddTab("AMC Report", frm);
                break;

            case "menuItemPriceOnlyReport":
                frm = new ItemPriceOnlyReport();
                AddTab("Item Price Only", frm);
                break;

            case "Facility Settings":
                frm = new Hospital();
                AddTab("Facility Settings", frm);
                break;

            case "Drug List":
                frm = new ManageItems();
                AddTab("Manage Drug List", frm);
                break;

            case "Supplies List":
                //frm = new ManageItems();
                frm = new ManageSupplies();
                AddTab("Manage Supplies List", frm);
                break;

            case "Item Consolidator":
                //frm = new ManageItems();
                frm = new ItemConsolidator();
                AddTab("Update Items List From The Directory Service", frm);
                break;

            case "Customize Druglist":
                frm = new CustomDrugList();
                AddTab("Customize Drug List", frm);
                break;

            case "System Settings":
                frm = new SystemSetting();
                AddTab("System Settings", frm);
                break;

            case "Facility Details":
                frm = new HospitalSettings();
                AddTab("Facility Details", frm);
                break;

            case "User Accounts":
                frm = new UserAccounts();
                AddTab("Manage Users", frm);
                break;

            case "Pipeline":
                frm = new Pipeline();
                AddTab("Pipeline", frm);
                break;

            case "Change Password":
                frm = new ChangePassword(UserId);
                AddTab("Change Password", frm);
                break;

            case "Transfer Log":
                frm = new LogTransfer();
                AddTab("Transfer Log", frm);
                break;


            case "VRF Form":
                frm = new vrfmainForm();
                AddTab("Vaccine Requistion and Report Form", frm);
                break;

            case "Losses/Adjustment":
                frm = new LossesAdjustment();
                AddTab("Losses and Adjustment", frm);
                break;

            case "Receive Log":
                frm = new LogReceive();
                AddTab("Receive Transaction Log", frm);
                break;

            case "Issue Log":
                frm = new LogIssues();
                AddTab("Issue Transaction Log", frm);
                break;

            case "Adjustment Log":
                frm = new LogAdjustment();
                AddTab("Loss / Adjustment Transaction Log", frm);
                break;

            case "Inventory Log":
                frm = new LogInventory();
                AddTab("Inventory Log", frm);
                break;

            case "Stock Status":
                frm = new ItemReport();
                AddTab("Stock Status", frm);
                break;

            case "Over Stocked":
                frm = new OtherItemReport("Over Stocked");
                AddTab("Over Stock Items", frm);
                break;

            case "Transfers":
                frm = new TransferForm();
                AddTab("Transfer Form", frm);
                break;

            case "Stock Out":
                frm = new OtherItemReport("Stock Out");
                AddTab("Stocked Out Items", frm);
                break;

            case "ConsumptionTrend":
                frm = new ConsumptionTrendReport();
                AddTab("Consumption Trend", frm);
                break;

            case "Issues By Receiving Unit":
                frm = new IssuesByDep();
                AddTab("Issues By Receiving Unit", frm);
                break;

            case "Expired Products":
                frm = new ExpiredProducts();
                AddTab("Expired Products", frm);
                break;

            case "Near Expiry":
                frm = new NearlyExpired();
                AddTab("Near Expiry Products", frm);
                break;

            case "SOH Trend":
                frm = new SOHTrend();
                AddTab("SOH Trend", frm);
                break;

            case "Receive Trend":
                frm = new ReceiveTrend();
                AddTab("Receive Trend", frm);
                break;

            case "Balance":
                frm = new BalanceReport();
                AddTab("Balance", frm);
                break;

            case "Summary Report":
                frm = new GeneralReport();
                AddTab("Summary Report", frm);
                break;

            case "Cost Summary":
                frm = new GeneralCostChart();
                AddTab("Cost Summary", frm);
                break;

            case "Wastage Rate":
                frm = new WastageRate();
                AddTab("Wastage Rate", frm);
                break;

            case "Summary Chart":
                frm = new GeneralChart();
                AddTab("General Chart", frm);
                break;

            case "Activity Log Reports":
                frm = new ActivityLogReports();
                AddTab("Activity Log", frm);
                break;

            case "ECLS":
                frm = new ECLS();
                AddTab("CS Stock Status", frm);
                break;

            case "Year End Process":
                frm = new YearEndProcess();
                AddTab("Inventory", frm);
                break;

            case "Default Year End Process":
                frm = new YearEndProcess(true);
                AddTab("Inventory", frm);
                break;

            case "Stock Expiry Status":
                frm = new GeneralExpiryChart();
                AddTab("Stock Status", frm);
                break;

            case "DataBase":
                frm = new DatabaseActions();
                AddTab("Database Actions", frm);
                break;

            case "PDA":
                frm = new ItemReport();
                AddTab("Stock Status", frm);
                break;

            case "Consumables List":
                frm = new ManageSupplies();
                AddTab("Supplies List", frm);
                break;

            case "RRF Form":
                frm = new RRFForm();
                AddTab("Report and Requisition Form", frm);
                break;

            case "LossReport":
                frm = new ExpiredProductsReport();
                AddTab("Loss / Adjustment Reporting View", frm);
                break;

            case "CostReport":
                frm = new CostReport();
                AddTab("Cost Report", frm);
                break;

            case "ConsumptionByUnit":
                frm = new ConsumptionByUnits();
                AddTab("Consumption By Dispensary Unit", frm);
                break;

            case "About":
                Program.ShowHCMISVersionInfoMessageBox();
                break;
            }
        }
        /// <summary>
        /// Loads a form to the panel
        /// </summary>
        /// <param name="tag">The tag of the button - Here is stored what type of form is supposed to be opened</param>
        private void LoadForm(string tag)
        {
            var yEnd = new YearEnd();
            if (yEnd.InventoryRequired(false))
            {
                switch (VisibilitySetting.HandleUnits)
                {
                    case 1:
                        yEnd.GenerateAutomaticInventory();
                        break;
                    case 2:
                        yEnd.GenerateAutomaticInventoryByUnit();
                        break;
                    case 3:
                        yEnd.GenerateAutomaticInventoryByUnit();
                        break;
                }
            }

            Form frm;
            switch (tag)
            {
                case "Receives":
                    frm = new ReceivingForm();
                    AddTab("Receiving Form", frm);
                    break;
                case "Issues":
                    frm = new IssueForm();
                    AddTab("Issue Form", frm);
                    break;
                case "AMCs":
                    frm = new AMCView();
                    AddTab("AMC Report", frm);
                    break;
                case "menuItemPriceOnlyReport":
                    frm = new ItemPriceOnlyReport();
                    AddTab("Item Price Only", frm);
                    break;
                case "stockoutindexer":
                    frm = new StockOutIndicesBuilder();
                    AddTab("Stockout Indices Builder",frm);
                    break;
                case "Facility Settings":
                    frm = new Hospital();
                    AddTab("Facility Settings", frm);
                    break;
                case "Drug List":
                    frm = new ManageItems();
                    AddTab("Manage Drug List", frm);
                    break;
                case "Supplies List":
                    //frm = new ManageItems();
                    frm = new ManageSupplies();
                    AddTab("Manage Supplies List", frm);
                    break;
               case "Item Consolidator":
                    //frm = new ManageItems();
                    frm = new ItemConsolidator();
                    AddTab("Update Items List From The Directory Service", frm);
                    break;

                case "Customize Druglist":
                    frm = new CustomDrugList();
                    AddTab("Customize Drug List", frm);
                    break;
                case "System Settings":
                    frm = new SystemSetting();
                    AddTab("System Settings", frm);
                    break;
                case "Facility Details":
                    frm = new HospitalSettings();
                    AddTab("Facility Details", frm);
                    break;
                case "User Accounts":
                    frm = new UserAccounts();
                    AddTab("Manage Users", frm);
                    break;
                case "Pipeline":
                    frm = new Pipeline();
                    AddTab("Pipeline", frm);
                    break;
                case "Change Password":
                    frm = new ChangePassword(UserId);
                    AddTab("Change Password", frm);
                    break;
                    break;
                case "Transfer Log":
                    frm = new LogTransfer();
                    AddTab("Transfer Log", frm);
                    break;
                case "Losses/Adjustment":
                    frm = new LossesAdjustment();
                    AddTab("Losses and Adjustment", frm);
                    break;
                case "Receive Log":
                    frm = new LogReceive();
                    AddTab("Receive Transaction Log", frm);
                    break;
                case "Issue Log":
                    frm = new LogIssues();
                    AddTab("Issue Transaction Log", frm);
                    break;
                case "Adjustment Log":
                    frm = new LogAdjustment();
                    AddTab("Loss / Adjustment Transaction Log", frm);
                    break;
                case "Inventory Log":
                    frm = new LogInventory();
                    AddTab("Inventory Log", frm);
                    break;
                case "Stock Status":
                    frm = new ItemReport();
                    AddTab("Stock Status", frm);
                    break;
                case "Over Stocked":
                    frm = new OtherItemReport("Over Stocked");
                    AddTab("Over Stock Items", frm);
                    break;
                case "Transfers":
                    frm = new TransferForm();
                    AddTab("Transfer Form", frm);
                    break;
                case "Stock Out":
                    frm = new OtherItemReport("Stock Out");
                    AddTab("Stocked Out Items", frm);
                    break;
                case "ConsumptionTrend":
                    frm = new ConsumptionTrendReport();
                    AddTab("Consumption Trend", frm);
                    break;
                case "Issues By Receiving Unit":
                    frm = new IssuesByDep();
                    AddTab("Issues By Receiving Unit", frm);
                    break;
                case "Expired Products":
                    frm = new ExpiredProducts();
                    AddTab("Expired Products", frm);
                    break;
                case "Near Expiry":
                    frm = new NearlyExpired();
                    AddTab("Near Expiry Products", frm);
                    break;
                case "SOH Trend":
                    frm = new SOHTrend();
                    AddTab("SOH Trend", frm);
                    break;
                case "Receive Trend":
                    frm = new ReceiveTrend();
                    AddTab("Receive Trend", frm);
                    break;
                case "Balance":
                    frm = new BalanceReport();
                    AddTab("Balance", frm);
                    break;
                case "Summary Report":
                    frm = new GeneralReport();
                    AddTab("Summary Report", frm);
                    break;
                case "Cost Summary":
                    frm = new GeneralCostChart();
                    AddTab("Cost Summary", frm);
                    break;
                case "Summary Chart":
                    frm = new GeneralChart();
                    AddTab("General Chart", frm);
                    break;
                case "ECLS":
                    frm = new ECLS();
                    AddTab("CS Stock Status", frm);
                    break;
                case "Year End Process":
                    frm = new YearEndProcess();
                    AddTab("Inventory", frm);
                    break;
                case "Default Year End Process":
                    frm = new YearEndProcess(true);
                    AddTab("Inventory", frm);
                    break;
                case "Stock Expiry Status":
                    frm = new GeneralExpiryChart();
                    AddTab("Stock Expiry Status", frm);
                    break;
                case "DataBase":
                    frm = new DatabaseActions();
                    AddTab("Database Actions", frm);
                    break;
                case "PDA":
                    frm = new ItemReport();
                    AddTab("Stock Status", frm);
                    break;
                case "Consumables List":
                    frm = new ManageSupplies();
                    AddTab("Supplies List", frm);
                    break;
                case "RRF Form":
                    frm = new RRFForm();
                    AddTab("Report and Requisition Form", frm);
                    break;
                case "LossReport":
                    frm = new ExpiredProductsReport();
                    AddTab("Loss / Adjustment Reporting View", frm);
                    break;
                case "CostReport":
                    frm = new CostReport();
                    AddTab("Cost Report", frm);
                    break;
                case "ConsumptionByUnit" :
                    frm = new ConsumptionByUnits();
                    AddTab("Consumption By Dispensary Unit", frm);
                    break;
                case "About":
                    Program.ShowHCMISVersionInfoMessageBox();
                    break;

            }
        }
Пример #6
0
        private void button3_Click(object sender, EventArgs e)
        {
            TransferForm transferf = new TransferForm();

            transferf.Show();
        }