/*
 * File: app/view/main/maincheckdoc/DocumentHistoryTabViewController.js
 *
 * This file was generated by Sencha Architect version 3.2.0.
 * http://www.sencha.com/products/architect/
 *
 * This file requires use of the Ext JS 5.1.x library, under independent license.
 * License of Sencha Architect does not include license for Ext JS 5.1.x. For more
 * details see http://www.sencha.com/license or contact license@sencha.com.
 *
 * This file will be auto-generated each and everytime you save your project.
 *
 * Do NOT hand edit this file.
 */

Ext.define('FrontHPApp.view.main.maincheckdoc.DocumentHistoryTabViewController', {
    extend: 'Ext.app.ViewController',
    alias: 'controller.mainmaincheckdocdocumenthistorytab',

    onClearClick: function(button, e, eOpts) {
        var me = this.getView(),
          form = me.down('form');

        paging = me.down('pagingtoolbar'),
        store = paging.getStore();
        store.getProxy().extraParams = {};
        form.reset();
        store.load();


    },
    onFindClick: function(button, e, eOpts) {
       
    var me = this,
       views = this.getView(),
       form = views.down('form').getForm(),
       store = views.down('grid').getStore();

    store.getProxy().setExtraParam('startdate', form.findField('QStartDate').getValue());
    store.getProxy().setExtraParam('enddate', form.findField('QEnddate').getValue());
    store.getProxy().setExtraParam('cusname', form.findField('QCusname').getValue());
    store.getProxy().setExtraParam('statusrequest', form.findField('QStatusRequest').getValue());
    store.getProxy().setExtraParam('requestno', form.findField('QRequestNo').getValue());
    store.getProxy().setExtraParam('citizenid', form.findField('QCitizenID').getValue());
    store.getProxy().setExtraParam('branch', form.findField('QBranch').getValue());
    store.load();
},

});
