Пример #1
0
 public void InitialData()
 {
     bal       = new TransactionMasterBAL();
     objResult = bal.FindByObjList(null);
     this.gridView1.GridControl.DataSource = objResult;
     foreach (DevExpress.XtraGrid.Columns.GridColumn item in gridView1.Columns)
     {
         item.MaxWidth = 0;
     }
     gridView1.HorzScrollVisibility               = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Always;
     gridView1.OptionsView.BestFitMode            = DevExpress.XtraGrid.Views.Grid.GridBestFitMode.Full;
     gridView1.OptionsView.ColumnHeaderAutoHeight = DevExpress.Utils.DefaultBoolean.True;
     gridView1.OptionsView.ColumnAutoWidth        = false;
     gridView1.BestFitColumns();
 }
Пример #2
0
        void SaveData()
        {
            dTable = TransactionMasterDTO.CreateDataTable();

            dRow = dTable.NewRow();

            dRow["TranOID"] =

                //  dRow["FileType"]=
                // dRow["GroupName"]=
                // dRow["ANZCustomerId"]=
                // dRow["CustRegisterName"]=
                //  dRow["CustCompanyAddress"]=
                // dRow["CustCompanyAddressCountry"]=
                // dRow["CustContractAddress"]=
                // dRow["CustContractAddressCountry"]=
                //  dRow["TransactionMethod"]=
                //  dRow["BeneTranxRefNo"]=
                // dRow["BeneBankName"]=
                //dRow["SendIdType"]=
                // dRow["SendIdNo"]=
                // dRow["SendIdIssueBy"]=
                // dRow["BeneIdNo"]=
                // dRow["BeneIdIssueBy"]=
                // dRow["Remark"]=
                // dRow["MappingSourceDB"] =
                //dRow["BeneIdType"]=
                dRow["CustomerInstrumentId"]  = txtInstrumentId.Text; // PK
            dRow["CustomerBankAccountNumber"] = txtBANKAccount.Text;  // PK

            dRow["CustRegisterID"]             = txtANZRegisterID.Text;
            dRow["CustBusinessCode"]           = txtANZBusinessCode.Text;
            dRow["CustRegisterAddress"]        = txtANZAddress.Text;
            dRow["CustRegisterAddressCountry"] = txtANZCountry.Text;

            dRow["CustRegisterDate"] = Utility.ConvertFormatDatetime(txtANZRegisterDate.Text);

            dRow["TransactionDate"]              = Utility.ConvertFormatDatetime(txtTransactionDate.Text);
            dRow["TranxAmountThb"]               = txtTranxAmountTHB.Text;
            dRow["TranxAmountCurrency"]          = txtCurrency.Text;
            dRow["TranxCurrency"]                = txtCurrency.Text;
            dRow["TranxExchangeRate"]            = txtExchangeRate.Text;
            dRow["TranxCurrency"]                = txtANZCountry.Text;
            dRow["TranxAmountThbInThWord"]       = "";
            dRow["TranxInternationalOrDomestic"] = "";
            dRow["TranxSendReceive"]             = txtTranxSendReceive.Text;
            dRow["TranxObjective"]               = txtObjective.Text;
            dRow["SendTranxRefNo"]               = txtSendTranxRefNo.Text;
            dRow["SendBankName"]      = txtSendBankName.Text;
            dRow["SendBankCountry"]   = txtSendBankCountry.Text;
            dRow["SendBankAccountNo"] = txtSendAccountNumber.Text;
            dRow["SendName"]          = txtSendName.Text;
            dRow["SendAddress"]       = txtSendAddress.Text;
            dRow["SendIdDescription"] = txtSendDescription.Text;
            dRow["BeneBankAccountNo"] = txtBeneAccountNumber.Text;
            dRow["BeneBankCountry"]   = txtBeneBankCountry.Text;
            dRow["BeneName"]          = txtBeneName.Text;
            dRow["BeneBankName"]      = txtBeneBankName.Text;
            dRow["BeneTranxRefNo"]    = txtBeneTranxRefNo.Text;

            dRow["BeneAddress"]       = txtBeneAddress.Text;
            dRow["BeneIdDescription"] = txtBeneDescription.Text;

            dTable.Rows.Add(dRow);

            bal = new TransactionMasterBAL();
            if (bal.Add(dTable))
            {
                MessageBox.Show(MessageDto.SaveSuccess, "Saving");
                popDetail.Visible = false;
                InitialData();
            }
        }