Tuesday 22 July 2014

Compact Framework Numeric Text Box

Dear All

A simple numeric text box  just add a simple text box after that create the On Key Press Event
then but the code below

 private void txtQty_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (Char.IsDigit(e.KeyChar) || Char.IsControl(e.KeyChar) || (e.KeyChar == '\b'))
            {
                e.Handled = false;
            }
            else
            {
                e.Handled = true;
            }
        }

Thanks and Regards
Hesham Hosni 

Monday 28 April 2014

How to pass values between Axapta forms

How to pass values between Axapta forms 

void clicked()
{
    Args myArgs;
    FormRun myFormRun;
    ;
    // Keep this call to super() when overriding the clicked method.
    super();

    myArgs = new Args();

    // Provide the name of the form to launch.
    myArgs.name("WebformBarcodeBatchPrint");

    // The DataSource_WorkOrder_M data source variable name
    // represents the currently selected item in the grid
    // on the parent form (and thus in the data source).
    myArgs.record(InventBatch);

    myFormRun = ClassFactory.formRunClass(myArgs);

    // if(DataSource_WorkOrder_M.WOStatus_fn()!=WOStatus::Closed) {
    myFormRun.init();
    myFormRun.run();
    myFormRun.wait();
}