Example #1
0
 public void ModifyList(int inputIndex, InvoiceRecordsDetails inputInvoiceRecords)
 {
     Debug.Log("Modify : " + inputIndex);
     loadFiles();
     currentInvoiceList [inputIndex] = inputInvoiceRecords;
     saveFile(currentInvoiceList);
 }
    public void refreshUI()
    {
        UI_invoiceManager.instance.saveCurrentInvoice();

        UIobj.SetActive(true);
        thisInvoiceData = Main_InvoiceManager.instance.getInvoice(UI_invoiceManager.instance.currentInvoiceIndex);

        //Top
        invoiceID_Text.text = thisInvoiceData.invoiceID;
        AccNo.setText(thisInvoiceData.clientAccNo);
        Address.setText(thisInvoiceData.clientAddress);
        Date_Tab.setText(thisInvoiceData.invoiceDate);

        //Main
        Term_Tab.setText(thisInvoiceData.term);
        PO_Tab.setText(thisInvoiceData.PurchaseOrder);
        DO_Tab.setText(thisInvoiceData.invoiceID);

        itemNo_UI.generateList(thisInvoiceData.itemNo_List);
        quantity_UI.generateList(thisInvoiceData.quantity_List);

        List <string> newStringList = thisInvoiceData.invoiceItem_List;

        newStringList.Insert(0, thisInvoiceData.projectTitle);
        itemsList_UI.generateList(newStringList);
    }
    public void refreshUI_justCopy(InvoiceRecordsDetails inputInvoiceData)
    {
        thisInvoiceData           = inputInvoiceData;
        thisInvoiceData.invoiceID = currentInvoiceIndex.ToString("0000");
        Debug.Log(" Copy : " + thisInvoiceData.invoiceID);
        //Top
        invoiceID_Text.text = thisInvoiceData.invoiceID;
        AccNo.setText(thisInvoiceData.clientAccNo);
        Address.setText(thisInvoiceData.clientAddress);
        Date_Tab.setText(thisInvoiceData.invoiceDate);

        //Main
        Term_Tab.setText(thisInvoiceData.term);
        SalesEngineerCode_Tab.setText(thisInvoiceData.salesEng_Code);
        PO_Tab.setText(thisInvoiceData.PurchaseOrder);
        DO_Tab.setText(thisInvoiceData.invoiceID);

        itemNo_UI.generateList(thisInvoiceData.itemNo_List);
        quantity_UI.generateList(thisInvoiceData.quantity_List);
        List <string> newStringList = thisInvoiceData.invoiceItem_List;

        newStringList.Insert(0, thisInvoiceData.projectTitle);
        itemsList_UI.generateList(newStringList);
        unitPrice_UI.generateList(thisInvoiceData.unitPrice_List);
        nettAmount_UI.generateList(thisInvoiceData.nettAmount_List);
    }
    void instantiateButton_S(InvoiceRecordsDetails inputInvoice)
    {
        GameObject newButton = Instantiate(invoicePrefab, prefabMama);

        newButton.SetActive(true);
//		SmartSuggestion_Button_Project button_s = newButton.GetComponent<SmartSuggestion_Button_Project> ();
//
//		button_s.thisInvoiceRecord = inputInvoice;
//		button_s.refreshText ();

        prefabList.Add(newButton);
    }
Example #5
0
    void instantiateButton_S(InvoiceRecordsDetails inputInvoice)
    {
        GameObject newButton = Instantiate(buttonPrefab, buttonsMama);

        newButton.SetActive(true);
        SmartSuggestion_Button_Project button_s = newButton.GetComponent <SmartSuggestion_Button_Project> ();

        button_s.justCopy          = this.justCopy;
        button_s.thisInvoiceRecord = inputInvoice;
        button_s.refreshText();

        buttonList.Add(newButton);
    }
Example #6
0
    InvoiceRecordsDetails NewEmptyInvoice()
    {
        InvoiceRecordsDetails newInvoice = new InvoiceRecordsDetails();

        newInvoice.invoiceID = (currentInvoiceList.Count).ToString("0000");
        Debug.Log("New Invoice : " + newInvoice.invoiceID);
        newInvoice.projectTitle = "New Project " + newInvoice.invoiceID;

        newInvoice.invoiceItem_List = new List <string> ();
        newInvoice.invoiceItem_List.Add("Item001");
        newInvoice.invoiceItem_List.Add("Item002");
        newInvoice.itemNo_List     = new List <string> ();
        newInvoice.quantity_List   = new List <string> ();
        newInvoice.unitPrice_List  = new List <string> ();
        newInvoice.nettAmount_List = new List <string> ();

        return(newInvoice);
    }
Example #7
0
 public void addNewProject(InvoiceRecordsDetails inputInvoiceData)
 {
     loadFiles();
     currentInvoiceList.Add(inputInvoiceData);
     saveFile(currentInvoiceList);
 }