Beispiel #1
0
    protected void LoadAllData(string OrgID)
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        feData.AddToDataSet("OrgInfo", "SELECT * FROM organization WHERE elt_account_number=" + elt_account_number + " AND org_account_number=" + OrgID);

        if (feData.Tables["OrgInfo"].Rows.Count > 0)
        {
            DataRow drOrg = feData.Tables["OrgInfo"].Rows[0];
            txtDBA.Text              = drOrg["dba_name"].ToString();
            txtLegalName.Text        = drOrg["business_legal_name"].ToString();
            txtAddress1.Text         = drOrg["business_address"].ToString();
            txtAddress2.Text         = drOrg["business_address2"].ToString();
            txtCity.Text             = drOrg["business_city"].ToString();
            txtState.Text            = drOrg["business_state"].ToString();
            txtZip.Text              = drOrg["business_zip"].ToString();
            lstCountry.SelectedValue = drOrg["b_country_code"].ToString();
            txtFirstName.Text        = drOrg["owner_fname"].ToString();
            txtMidName.Text          = drOrg["owner_mname"].ToString();
            txtLastName.Text         = drOrg["owner_lname"].ToString();
            txtPhone.Text            = FormatStringNumberOnly(drOrg["business_phone"].ToString());
            txtFax.Text              = FormatStringNumberOnly(drOrg["business_fax"].ToString());
            txtCell.Text             = FormatStringNumberOnly(drOrg["owner_phone"].ToString());
            txtEmail.Text            = drOrg["owner_email"].ToString();
            txtTaxID.Text            = drOrg["business_fed_taxid"].ToString();
        }
    }
Beispiel #2
0
    protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        string sqlTxt = "";

        if (hOrgID.Value == "" || hOrgID.Value == "0")
        {
            sqlTxt = "SELECT * FROM ig_schedule_b WHERE elt_account_number=" + elt_account_number + " AND sb_id=" + ListBox1.SelectedValue;
        }
        else
        {
            sqlTxt = "SELECT * FROM scheduleB WHERE elt_account_number=" + elt_account_number + " AND auto_uid=" + ListBox1.SelectedValue;
        }

        feData.AddToDataSet("scheduleBInfo", sqlTxt);

        if (feData.Tables["scheduleBInfo"].Rows.Count > 0)
        {
            DataRow dtTmp = feData.Tables["scheduleBInfo"].Rows[0];
            hSBCode.Value      = dtTmp["sb"].ToString();
            hUnit1.Value       = dtTmp["sb_unit1"].ToString();
            hUnit2.Value       = dtTmp["sb_unit2"].ToString();
            hDesc.Value        = dtTmp["description"].ToString();
            hExportCode.Value  = dtTmp["export_code"].ToString();
            hLicenseType.Value = dtTmp["license_type"].ToString();
            hECCN.Value        = dtTmp["eccn"].ToString();
        }
    }
Beispiel #3
0
    protected void Load_Booking_Confirm(string bc_uid)
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        feData.AddToDataSet("BookingConfirm", "select * from booking_confirm where elt_account_number="
                            + elt_account_number + " and auto_uid=" + bc_uid + "");
        DataTable dt = feData.Tables["BookingConfirm"];

        this.hSearchNum.Value          = dt.Rows[0]["auto_uid"].ToString();
        this.spn_prefix_select.Visible = false;
        this.td_bill_select.Visible    = false;
        if (dt.Rows[0]["document_date"] != DBNull.Value)
        {
            this.txt_document_date.Text = Convert.ToDateTime(dt.Rows[0]["document_date"]).ToShortDateString();
        }
        this.txt_booking_no.Text           = dt.Rows[0]["booking_no"].ToString();
        this.lstSearchNum.Text             = dt.Rows[0]["bc_no"].ToString();
        this.hf_booking_no.Value           = dt.Rows[0]["booking_no"].ToString();
        this.hf_master_no.Value            = dt.Rows[0]["master_no"].ToString();
        this.hf_house_no.Value             = dt.Rows[0]["house_no"].ToString();
        this.hf_sub_house_no.Value         = dt.Rows[0]["sub_house_no"].ToString();
        this.hShipperAcct.Value            = dt.Rows[0]["shipper_acct"].ToString();
        this.lstShipperName.Text           = dt.Rows[0]["shipper_name"].ToString();
        this.txtShipperInfo.Text           = dt.Rows[0]["shipper_info"].ToString();
        this.hConsigneeAcct.Value          = dt.Rows[0]["deliver_to_acct"].ToString();
        this.lstConsigneeName.Text         = dt.Rows[0]["deliver_to_name"].ToString();
        this.txtConsigneeInfo.Text         = dt.Rows[0]["deliver_to_info"].ToString();
        this.txt_cut_off_date.Text         = dt.Rows[0]["cut_off_date"].ToString();
        this.txt_export_reference.Text     = dt.Rows[0]["export_reference"].ToString();
        this.hCarrierAcct.Value            = dt.Rows[0]["carrier_acct"].ToString();
        this.lstCarrierName.Text           = dt.Rows[0]["carrier_name"].ToString();
        this.txt_carrier_no.Text           = dt.Rows[0]["carrier_no"].ToString();
        this.txt_place_of_receipt.Text     = dt.Rows[0]["place_of_receipt"].ToString();
        this.txt_place_of_delivery.Text    = dt.Rows[0]["place_of_delivery"].ToString();
        this.ddl_origin_port.SelectedValue = dt.Rows[0]["dep_port"].ToString();
        this.ddl_dest_port.SelectedValue   = dt.Rows[0]["arr_port"].ToString();
        if (dt.Rows[0]["eta"] != DBNull.Value)
        {
            this.txt_eta_date.Text = Convert.ToDateTime(dt.Rows[0]["eta"]).ToShortDateString();
        }
        if (dt.Rows[0]["etd"] != DBNull.Value)
        {
            this.txt_etd_date.Text = Convert.ToDateTime(dt.Rows[0]["etd"]).ToShortDateString();
        }
        this.txt_type_of_move.Text            = dt.Rows[0]["move_type"].ToString();
        this.hAgentAcct.Value                 = dt.Rows[0]["dest_agent_acct"].ToString();
        this.lstAgentName.Text                = dt.Rows[0]["dest_agent_name"].ToString();
        this.txtAgentInfo.Text                = dt.Rows[0]["dest_agent_info"].ToString();
        this.hEmptyPickupAcct.Value           = dt.Rows[0]["empty_container_pick_up_acct"].ToString();
        this.lstEmptyPickupName.Text          = dt.Rows[0]["empty_container_pick_up_name"].ToString();
        this.txtEmptyPickupInfo.Text          = dt.Rows[0]["empty_container_pick_up_info"].ToString();
        this.rbl_dangerous_good.SelectedValue = dt.Rows[0]["dangerous"].ToString();
        this.txt_quantity.Text                = dt.Rows[0]["quantity"].ToString();
        this.ddl_quantity_unit.SelectedValue  = dt.Rows[0]["quantity_unit"].ToString();
        this.txt_description.Text             = dt.Rows[0]["item_desc"].ToString();
        this.txt_weight.Text = dt.Rows[0]["gross_weight"].ToString();
        this.ddl_weight_scale.SelectedValue    = dt.Rows[0]["weight_scale"].ToString();
        this.txt_dimension.Text                = dt.Rows[0]["dimension"].ToString();
        this.ddl_dimension_scale.SelectedValue = dt.Rows[0]["dimension_scale"].ToString();
        this.txt_remark.Text = dt.Rows[0]["remark"].ToString();
    }
Beispiel #4
0
    protected void UpdateScheduleB()
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        string[] tranStr = new string[1];

        tranStr[0] = "UPDATE scheduleB SET "
                     + " sb=N'" + txtSBCode.Text
                     + "',sb_unit1=N'" + lstSBUnit1.SelectedValue
                     + "',sb_unit2=N'" + lstSBUnit2.SelectedValue
                     + "',description=N'" + txtItemDesc.Text
                     + "',export_code=N'" + lstExportCode.SelectedValue
                     + "',license_type=N'" + lstLicenseType.SelectedValue
                     + "',eccn=N'" + txtECCN.Text
                     + "' WHERE elt_account_number=" + elt_account_number + " AND auto_uid=" + hSBID.Value;

        if (!feData.DataTransactions(tranStr))
        {
            string errorStr = feData.GetLastTransactionError();
            string errorMsg = "Unexpected error occurred. " + errorStr;

            tableContent.Visible = false;
            txtResultBox.Text    = errorMsg;
            txtResultBox.Visible = true;
        }
        else
        {
            this.ClientScript.RegisterClientScriptBlock(this.GetType(), "close_window_return", "<script>close_window_return(" + 0 + ",'');</script>");
        }
    }
Beispiel #5
0
    protected void AddNewAES()
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        ArrayList tranStrAL = new ArrayList();
        string    tranStr   = "";

        tranStr = "SET ANSI_WARNINGS OFF";
        tranStrAL.Add(tranStr);

        tranStr = @"INSERT INTO aes_master(elt_account_number,party_to_transaction,export_date,tran_ref_no,consignee_acct,inter_consignee_acct,origin_state,dest_country,tran_method,export_port,unloading_port,carrier_id_code,export_carrier,shipment_ref_no,entry_no,hazardous_materials,route_export_tran,in_bond_type,in_bond_no,ftz,last_modified,shipper_acct,file_type,house_num,master_num)
            VALUES(" + elt_account_number + ",N'" + RCC.SelectedValue + "',N'" + EDA.Text + "',N'" + BN.Text + "'," + MakeNullCase(hConsigneeAcct.Value) + "," + MakeNullCase(hInterConsigneeAcct.Value) + ",N'" + ST.SelectedValue + "',N'" + COD.SelectedValue + "',N'" + MOT.SelectedValue + "',N'" + POE.SelectedValue + "',N'" + POU.SelectedValue
                  + "',N'" + lstCarrier.SelectedValue + "',N'" + lstCarrier.Items[lstCarrier.SelectedIndex].Text + "',N'" + SRN.Text + "','',N'" + HAZ.SelectedValue + "',N'" + RT.SelectedValue + "',N'" + IBT.SelectedValue + "',N'" + IBN.Text + "',N'" + FTZ.Text + "',GETDATE()," + MakeNullCase(hShipperAcct.Value) + ",N'" + hFileType.Value + "',N'" + txtHouse.Text + "',N'" + txtMaster.Text + "')";
        tranStrAL.Add(tranStr);



        if (!feData.DataTransactions((string[])tranStrAL.ToArray(typeof(string))))
        {
            txtResultBox.Text    = feData.GetLastTransactionError();
            txtResultBox.Visible = true;
        }
        else
        {
            feData.AddToDataSet("AESInfo", "SELECT * FROM aes_master WHERE elt_account_number=" + elt_account_number + " AND shipment_ref_no=N'" + SRN.Text + "' AND file_type='OE'");

            if (feData.Tables["AESInfo"].Rows.Count > 0)
            {
                SaveLineItems(Convert.ToInt32(feData.Tables["AESInfo"].Rows[0]["auto_uid"]));
                Response.Redirect("EditOceanAES.aspx?AESID=" + feData.Tables["AESInfo"].Rows[0]["auto_uid"].ToString());
            }
        }
    }
Beispiel #6
0
    protected void AddNewAES()
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        ArrayList tranStrAL = new ArrayList();
        string    tranStr   = "";

        tranStr = "SET ANSI_WARNINGS OFF";
        tranStrAL.Add(tranStr);

        tranStr = @"INSERT INTO aes_master(elt_account_number,party_to_transaction,export_date,tran_ref_no,consignee_acct,inter_consignee_acct,origin_state,dest_country,tran_method,export_port,unloading_port,carrier_id_code,export_carrier,shipment_ref_no,entry_no,hazardous_materials,route_export_tran,in_bond_type,in_bond_no,ftz,last_modified,shipper_acct,file_type,house_num,master_num)
            VALUES(" + elt_account_number + ",N'" + RCC.SelectedValue + "',N'" + EDA.Text + "',N'" + BN.Text + "'," + MakeNullCase(hConsigneeAcct.Value) + "," + MakeNullCase(hInterConsigneeAcct.Value) + ",N'" + ST.SelectedValue + "',N'" + COD.SelectedValue + "',N'" + MOT.SelectedValue + "',N'" + POE.SelectedValue + "',N'" + POU.SelectedValue
                  + "',N'" + lstCarrier.SelectedValue + "',N'" + lstCarrier.Items[lstCarrier.SelectedIndex].Text + "',N'" + SRN.Text + "','',N'" + HAZ.SelectedValue + "',N'" + RT.SelectedValue + "',N'" + IBT.SelectedValue + "',N'" + IBN.Text + "',N'" + FTZ.Text + "',GETDATE()," + MakeNullCase(hShipperAcct.Value) + ",N'" + hFileType.Value + "',N'" + txtHouse.Text + "',N'" + txtMaster.Text + "')";
        tranStrAL.Add(tranStr);

        // AES item insert loop using grid entries
        for (int i = 0; i < UltraWebGrid1.Rows.Count; i++)
        {
            if (UltraWebGrid1.Rows[i].Cells[3].Value == null)
            {
                UltraWebGrid1.Rows[i].Cells[3].Value = "0";
            }
            if (UltraWebGrid1.Rows[i].Cells[5].Value == null)
            {
                UltraWebGrid1.Rows[i].Cells[5].Value = "0";
            }
            if (UltraWebGrid1.Rows[i].Cells[7].Value == null)
            {
                UltraWebGrid1.Rows[i].Cells[7].Value = "0";
            }
            if (UltraWebGrid1.Rows[i].Cells[8].Value == null)
            {
                UltraWebGrid1.Rows[i].Cells[8].Value = "0";
            }

            tranStr = @"INSERT INTO aes_detail(elt_account_number,item_no,dfm,b_number,item_desc,b_qty1,unit1,b_qty2,unit2,gross_weight,item_value,export_code,license_type,license_number,eccn,vin_type,vin,vc_title,vc_state,aes_id)
                VALUES(" + elt_account_number + "," + i + ",N'" + UltraWebGrid1.Rows[i].Cells[0].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[1].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[1].Text
                      + "'," + UltraWebGrid1.Rows[i].Cells[3].Value + ",N'" + UltraWebGrid1.Rows[i].Cells[4].Value + "'," + UltraWebGrid1.Rows[i].Cells[5].Value + ",N'" + UltraWebGrid1.Rows[i].Cells[6].Value
                      + "'," + UltraWebGrid1.Rows[i].Cells[7].Value + "," + UltraWebGrid1.Rows[i].Cells[8].Value + ",N'" + UltraWebGrid1.Rows[i].Cells[9].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[10].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[11].Value
                      + "',N'" + UltraWebGrid1.Rows[i].Cells[12].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[13].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[14].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[15].Value + "',N'" + UltraWebGrid1.Rows[i].Cells[16].Value + "',IDENT_CURRENT('aes_master'))";
            tranStrAL.Add(tranStr);

            tranStr = "SET ANSI_WARNINGS ON";
            tranStrAL.Add(tranStr);
        }

        if (!feData.DataTransactions((string[])tranStrAL.ToArray(typeof(string))))
        {
            txtResultBox.Text    = feData.GetLastTransactionError();
            txtResultBox.Visible = true;
        }
        else
        {
            feData.AddToDataSet("AESInfo", "SELECT * FROM aes_master WHERE elt_account_number=" + elt_account_number + " AND shipment_ref_no=N'" + SRN.Text + "'AND file_type='AE'");

            if (feData.Tables["AESInfo"].Rows.Count > 0)
            {
                Response.Redirect("EditAES.aspx?AESID=" + feData.Tables["AESInfo"].Rows[0]["auto_uid"].ToString());
            }
        }
    }
Beispiel #7
0
    protected void AddNewScheduleB()
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        ArrayList tranStrAL = new ArrayList();
        string    tranStr   = "";

        tranStr = "INSERT INTO scheduleB(elt_account_number,sb,description,sb_unit1,sb_unit2,export_code,license_type,eccn)\n"
                  + "VALUES(" + elt_account_number + ",N'" + txtSBCode.Text + "',N'" + txtItemDesc.Text + "',N'"
                  + lstSBUnit1.SelectedValue + "',N'" + lstSBUnit2.SelectedValue + "',N'" + lstExportCode.SelectedValue + "',N'"
                  + lstLicenseType.SelectedValue + "',N'" + txtECCN.Text + "')";
        tranStrAL.Add(tranStr);

        if (hOrgID.Value != null && hOrgID.Value != "")
        {
            tranStr = "INSERT INTO ig_schedule_b(elt_account_number,org_account_number,sb_id,sb,description,sb_unit1,sb_unit2,export_code,license_type,eccn)\n"
                      + "VALUES(" + elt_account_number + "," + hOrgID.Value + ",IDENT_CURRENT('scheduleB')-1,N'" + txtSBCode.Text + "',N'" + txtItemDesc.Text + "',N'"
                      + lstSBUnit1.SelectedValue + "',N'" + lstSBUnit2.SelectedValue + "',N'" + lstExportCode.SelectedValue + "',N'"
                      + lstLicenseType.SelectedValue + "',N'" + txtECCN.Text + "')";
            tranStrAL.Add(tranStr);
        }

        if (!feData.DataTransactions((string[])tranStrAL.ToArray(typeof(string))))
        {
            string errorStr = feData.GetLastTransactionError();
            string errorMsg = "Unexpected error occurred. " + errorStr;

            tableContent.Visible = false;
            txtResultBox.Text    = errorMsg;
            txtResultBox.Visible = true;
        }
        else
        {
            this.ClientScript.RegisterClientScriptBlock(this.GetType(), "close_window_return", "<script>close_window_return(" + 0 + ",'');</script>");
        }
    }
Beispiel #8
0
    protected void Save_Setup_page()
    {
        string[] sqlTxt = new string[1];

        if (hPageId.Value == "")
        {
            sqlTxt[0] = "INSERT INTO setup_master(seq_id,title,setup_url,setup_type,valid_url,remark) "
                        + "VALUES (" + hSeqId.Value + ",'" + txtPageTitle.Text + "','" + txtPageURL.Text
                        + "','" + lstSetupType.SelectedValue + "','" + txtValidURL.Text + "','" + txtRemark.Text + "')";
        }
        else
        {
            sqlTxt[0] = "UPDATE setup_master SET "
                        + "seq_id=" + hSeqId.Value + ","
                        + "title='" + txtPageTitle.Text + "',"
                        + "setup_url='" + txtPageURL.Text + "',"
                        + "setup_type='" + lstSetupType.SelectedValue + "',"
                        + "valid_url='" + txtValidURL.Text + "',"
                        + "remark='" + txtRemark.Text + "' WHERE page_id=" + hPageId.Value;
            // update change
        }

        FreightEasy.DataManager.FreightEasyData FEData = new FreightEasy.DataManager.FreightEasyData();
        if (!FEData.DataTransactions(sqlTxt))
        {
            Response.Redirect("/IFF_MAIN/SystemAdmin/SetupManager.aspx");
        }
        else
        {
            Response.Write(sqlTxt[0]);
        }
    }
Beispiel #9
0
    protected void InsertGeneralJournalEntry()
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        string tranStr = "";

        tranStr  = "DECLARE @new_entry_number DECIMAL\n";
        tranStr += "DECLARE @new_seq_number DECIMAL\n";
        tranStr += "SET @new_entry_number=(SELECT ISNULL(MAX(entry_no),0)+1 FROM general_journal_entry WHERE elt_account_number=" + elt_account_number + ")\n";
        tranStr += "SET @new_seq_number=(SELECT ISNULL(MAX(tran_seq_num),0)+1 FROM all_accounts_journal WHERE elt_account_number=" + elt_account_number + ")\n";
        tranStr += "INSERT INTO general_journal_entry(elt_account_number,entry_no,item_no,gl_account_number,credit,debit,memo,org_acct,dt)\n";
        tranStr += "VALUES(" + elt_account_number + ",@new_entry_number,1," + lstBanks.SelectedValue + ",0," + txtAmount.Text + ",N'" + txtMemo.Text + "'," + hVendorAcct.Value + ",GETDATE())\n";
        tranStr += "INSERT INTO general_journal_entry(elt_account_number,entry_no,item_no,gl_account_number,credit,debit,memo,org_acct,dt)\n";
        tranStr += "VALUES(" + elt_account_number + ",@new_entry_number,1," + lstRevenues.SelectedValue + "," + txtAmount.Text + ",0,N'" + txtMemo.Text + "'," + hVendorAcct.Value + ",GETDATE())\n";
        tranStr += "INSERT INTO all_accounts_journal(elt_account_number,tran_seq_num,gl_account_number,gl_account_name,tran_type,tran_num,tran_date,customer_name,customer_number,split,memo,debit_amount,credit_amount)\n";
        tranStr += "VALUES(" + elt_account_number + ",@new_seq_number," + lstBanks.SelectedValue + ",N'" + lstBanks.Items[lstBanks.SelectedIndex].Text + "','DEPOSIT',@new_entry_number,GETDATE(),N'" + lstVendorName.Text + "'," + hVendorAcct.Value + ",'',N'" + txtMemo.Text + "'," + txtAmount.Text + ",0)\n";
        tranStr += "INSERT INTO all_accounts_journal(elt_account_number,tran_seq_num,gl_account_number,gl_account_name,tran_type,tran_num,tran_date,customer_name,customer_number,split,memo,debit_amount,credit_amount)\n";
        tranStr += "VALUES(" + elt_account_number + ",@new_seq_number+1," + lstRevenues.SelectedValue + ",N'" + lstBanks.Items[lstRevenues.SelectedIndex].Text + "','DEPOSIT',@new_entry_number,GETDATE(),N'" + lstVendorName.Text + "'," + hVendorAcct.Value + ",'',N'" + txtMemo.Text + "',0," + txtAmount.Text + ")\n";

        if (!feData.DataTransaction(tranStr))
        {
            string errorStr = feData.GetLastTransactionError();
            string errorMsg = "Unexpected error occurred. " + errorStr;

            txtResultBox.Text    = errorMsg;
            txtResultBox.Visible = true;
        }
    }
Beispiel #10
0
    protected void LoadScheduleBList()
    {
        string sqlTxt = "";

        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();

        if (hOrgID.Value == "" || hOrgID.Value == "0")
        {
            sqlTxt = "SELECT auto_uid AS sb_id,[description] FROM scheduleB WHERE elt_account_number="
                     + elt_account_number + " ORDER BY [description]";
        }
        else
        {
            sqlTxt = "IF EXISTS (SELECT * FROM ig_schedule_b WHERE elt_account_number="
                     + elt_account_number + " AND org_account_number=" + hOrgID.Value + ")\n"
                     + "SELECT sb_id,[description],org_account_number FROM ig_schedule_b WHERE elt_account_number="
                     + elt_account_number + " AND org_account_number=" + hOrgID.Value + " ORDER BY [description]\n"
                     + "ELSE\n"
                     + "SELECT auto_uid AS sb_id,[description] FROM scheduleB WHERE elt_account_number=" + elt_account_number + " ORDER BY [description]";
        }

        feData.AddToDataSet("ScheduleB", sqlTxt);
        ListBox1.DataSource     = feData.Tables["ScheduleB"];
        ListBox1.DataTextField  = "description";
        ListBox1.DataValueField = "sb_id";
        ListBox1.DataBind();
    }
Beispiel #11
0
    protected void btnAddAll_Click(object sender, EventArgs e)
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        ArrayList tranStrAL = new ArrayList();
        string    tranStr   = "";

        tranStr = "DELETE FROM ig_schedule_b WHERE elt_account_number=" + elt_account_number
                  + " AND org_account_number=" + hOrgID.Value;
        tranStrAL.Add(tranStr);

        tranStr = "INSERT INTO ig_schedule_b SELECT " + elt_account_number
                  + " AS elt_account_number," + hOrgID.Value + " AS org_account_number"
                  + ",sb,sb_unit1,sb_unit2,description,NULL AS is_org_merged,export_code,license_type,eccn,auto_uid"
                  + " FROM scheduleB WHERE elt_account_number=" + elt_account_number;
        tranStrAL.Add(tranStr);


        if (!feData.DataTransactions((string[])tranStrAL.ToArray(typeof(string))))
        {
            txtResultBox.Text    = feData.GetLastTransactionError();
            txtResultBox.Visible = true;
        }
        else
        {
            GridView1.DataBind();
            GridView2.DataBind();
            Initialize_Components();
        }
    }
Beispiel #12
0
    protected void AddNewConsignee()
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        string[] tranStr = new string[1];
        tranStr[0]  = "DECLARE @new_org_id DECIMAL\n";
        tranStr[0] += "SET @new_org_id=(SELECT ISNULL(MAX(org_account_number),0)+1 FROM organization WHERE elt_account_number=" + elt_account_number + ")\n";
        tranStr[0] += "INSERT INTO organization(elt_account_number,org_account_number,dba_name,business_legal_name,business_address,business_address2,business_city,business_state,business_zip,business_country,b_country_code,business_phone,business_fax,owner_lname,owner_fname,owner_mname,owner_phone,owner_email,account_status,date_opened,last_update)\n";
        tranStr[0] += "VALUES(" + elt_account_number + ",@new_org_id,N'" + txtDBA.Text + "',N'" + txtLegalName.Text + "',N'" + txtAddress1.Text + "',N'" + txtAddress2.Text + "',N'" + txtCity.Text + "',N'" + txtState.Text + "',N'" + txtZip.Text + "',N'" + lstCountry.Items[lstCountry.SelectedIndex].Text
                      + "',N'" + lstCountry.SelectedValue + "',N'" + txtPhone.Text + "',N'" + txtFax.Text + "',N'" + txtLastName.Text + "',N'" + txtFirstName.Text + "',N'" + txtMidName.Text + "',N'" + txtCell.Text + "',N'" + txtEmail.Text + "','A',GETDATE(),GETDATE())";

        if (!feData.DataTransactions(tranStr))
        {
            string errorStr = feData.GetLastTransactionError();
            string errorMsg = "Unexpected error occurred. " + errorStr;

            tableContent.Visible = false;
            txtResultBox.Text    = errorMsg;
            txtResultBox.Visible = true;
            btnSave.Visible      = false;
        }
        else
        {
            this.ClientScript.RegisterClientScriptBlock(this.GetType(), "close_window_return", "<script>close_window_return(" + 0 + ",'');</script>");
        }
    }
Beispiel #13
0
    protected void Page_Init(object sender, EventArgs e)
    {
        elt_account_number = Request.Cookies["CurrentUserInfo"]["elt_account_number"];
        user_id            = Request.Cookies["CurrentUserInfo"]["user_id"];
        user_right         = Request.Cookies["CurrentUserInfo"]["user_right"];
        login_name         = Request.Cookies["CurrentUserInfo"]["login_name"];
        org_id             = Request.Params["orgID"].ToString();

        if (org_id == "" || org_id == "0")
        {
            labelTitle.Text = "ADD NEW COMPANY";
            org_id          = "";
        }
        else
        {
            labelTitle.Text = "EDIT COMPANY";
        }

        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        feData.AddToDataSet("Countries", "SELECT * FROM country_code WHERE elt_account_number=" + elt_account_number + " ORDER BY country_name");

        lstCountry.DataSource     = feData.Tables["Countries"];
        lstCountry.DataTextField  = "country_name";
        lstCountry.DataValueField = "country_code";
        lstCountry.DataBind();
        lstCountry.Items.Insert(0, new ListItem("", ""));
    }
Beispiel #14
0
    protected void Page_Init(object sender, EventArgs e)
    {
        // Naviagtor assigned
        //WebNavBar1.GridID = UltraWebGrid1.UniqueID;

        // FreightEasyData Initialized
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        feData.AddToDataSet("Ports", "SELECT port_code + ' - ' + port_desc as port_name,port_code FROM port WHERE elt_account_number=" + elt_account_number + " AND ISNULL(port_id,'')<>'' ORDER BY port_desc");
        feData.AddToDataSet("Countries", "SELECT * FROM country_code WHERE elt_account_number=" + elt_account_number + " order by country_name");
        feData.AddToDataSet("MOT", "SELECT code_id,code_desc FROM aes_codes WHERE code_type='Transport Code' ORDER BY code_id");
        feData.AddToDataSet("Carriers", "SELECT ISNULL(carrier_id,'') AS carrier_code,LEFT(dba_name,22) AS carrier_name FROM organization WHERE is_carrier='Y' AND ISNULL(carrier_id,'') <> '' AND ISNULL(carrier_code,'')<>'' AND elt_account_number=" + elt_account_number + " ORDER BY dba_name");

        // Form initialize
        POE.DataSource     = feData.Tables["Ports"];
        POE.DataTextField  = "port_name";
        POE.DataValueField = "port_code";
        POE.DataBind();
        POE.Items.Insert(0, new ListItem("", ""));

        POU.DataSource     = feData.Tables["Ports"];
        POU.DataTextField  = "port_name";
        POU.DataValueField = "port_code";
        POU.DataBind();
        POU.Items.Insert(0, new ListItem("", ""));

        COD.DataSource     = feData.Tables["Countries"];
        COD.DataTextField  = "country_name";
        COD.DataValueField = "country_code";
        COD.DataBind();
        COD.Items.Insert(0, new ListItem("", ""));

        MOT.DataSource     = feData.Tables["MOT"];
        MOT.DataTextField  = "code_desc";
        MOT.DataValueField = "code_id";
        MOT.DataBind();
        MOT.Items.Insert(0, new ListItem("", ""));

        lstCarrier.DataSource     = feData.Tables["Carriers"];
        lstCarrier.DataTextField  = "carrier_name";
        lstCarrier.DataValueField = "carrier_code";
        lstCarrier.DataBind();
        lstCarrier.Items.Insert(0, new ListItem("", ""));

        hFileType.Value = move_type;

        // New AES
        if (aes_id == "" || aes_id == "0")
        {
            labelPageTitle.Text = "New AES Form";
            trInfo1.Visible     = false;
            trInfo2.Visible     = false;
        }
        // Saved AES
        else
        {
            labelPageTitle.Text = "Edit AES Form";
        }
    }
Beispiel #15
0
    protected void Page_Init(object sender, EventArgs e)
    {
        LoadUserInfo();
        if (!IsPostBack)
        {
            LoadParameters();
            CheckExistingAES();
        }
        // FreightEasyData Initialized
        FreightEasy.DataManager.FreightEasyData feData = SetDataList();
        // Form initialize
        POE.DataSource     = feData.Tables["Ports"];
        POE.DataTextField  = "port_name";
        POE.DataValueField = "port_code";
        POE.DataBind();
        POE.Items.Insert(0, new ListItem("", ""));

        POU.DataSource     = feData.Tables["Ports"];
        POU.DataTextField  = "port_name";
        POU.DataValueField = "port_code";
        POU.DataBind();
        POU.Items.Insert(0, new ListItem("", ""));

        COD.DataSource     = feData.Tables["Countries"];
        COD.DataTextField  = "country_name";
        COD.DataValueField = "country_code";
        COD.DataBind();
        COD.Items.Insert(0, new ListItem("", ""));

        MOT.DataSource     = feData.Tables["MOT"];
        MOT.DataTextField  = "code_desc";
        MOT.DataValueField = "code_id";
        MOT.DataBind();
        MOT.Items.Insert(0, new ListItem("", ""));

        lstCarrier.DataSource     = feData.Tables["Carriers"];
        lstCarrier.DataTextField  = "carrier_name";
        lstCarrier.DataValueField = "carrier_code";
        lstCarrier.DataBind();
        lstCarrier.Items.Insert(0, new ListItem("", ""));

        hFileType.Value = move_type;

        // New AES
        if (string.IsNullOrEmpty(AESID))
        {
            labelPageTitle.Text = "New AES Form";
            trInfo1.Visible     = false;
            trInfo2.Visible     = false;
        }
        // Saved AES
        else
        {
            labelPageTitle.Text = "Edit AES Form";
        }
    }
Beispiel #16
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        string sqlTxt = sqlTxt = "DELETE FROM setup_master WHERE page_id=" + hPageId.Value;

        FreightEasy.DataManager.FreightEasyData FEData = new FreightEasy.DataManager.FreightEasyData();
        if (FEData.DataTransaction(sqlTxt))
        {
            Response.Redirect("/IFF_MAIN/SystemAdmin/SetupManager.aspx");
        }
    }
Beispiel #17
0
 protected void SetFreightEasyData(GridView control, string txtSQL)
 {
     // gvHouseResult.Clear();
     FEData = new FreightEasy.DataManager.FreightEasyData();
     FEData.AddToDataSet("SearchList", txtSQL);
     control.DataSource = FEData.Tables["SearchList"].DefaultView;
     control.DataBind();
     txtResultBox.Text      = FEData.Tables["SearchList"].Rows.Count.ToString() + " Records Found.";
     btnExcelExport.Visible = true;
 }
Beispiel #18
0
 protected void SetFreightEasyData(string txtSQL)
 {
     UltraWebGrid1.Clear();
     FEData = new FreightEasy.DataManager.FreightEasyData();
     FEData.AddToDataSet("SearchList", txtSQL);
     UltraWebGrid1.DataSource = FEData.Tables["SearchList"].DefaultView;
     UltraWebGrid1.DataBind();
     UltraWebGrid1.DisplayLayout.Pager.CurrentPageIndex = 1;
     txtResultBox.Text      = FEData.Tables["SearchList"].Rows.Count.ToString() + " Records Found.";
     btnExcelExport.Visible = true;
 }
Beispiel #19
0
    protected void btnDeleteAll_Click(object sender, EventArgs e)
    {
        string sqlStr = "DELETE FROM country_code WHERE elt_account_number=" + elt_account_number;

        FreightEasy.DataManager.FreightEasyData FEData = new FreightEasy.DataManager.FreightEasyData();
        FEData.DataTransaction(sqlStr);

        GridView1.DataBind();
        GridView2.DataBind();
        Initialize_Components();
    }
Beispiel #20
0
    protected void ListBox1_Load_Data()
    {
        FreightEasy.DataManager.FreightEasyData FEData = new FreightEasy.DataManager.FreightEasyData();
        FEData.AddToDataSet("SetupSteps", "select * from setup_master order by seq_id");
        DataTable tmpDt = FEData.Tables["SetupSteps"];

        ListBox1.DataSource     = tmpDt;
        ListBox1.DataTextField  = tmpDt.Columns["title"].ToString();
        ListBox1.DataValueField = tmpDt.Columns["page_id"].ToString();
        ListBox1.DataBind();
    }
Beispiel #21
0
 private FreightEasy.DataManager.FreightEasyData SetDataList()
 {
     FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
     feData.AddToDataSet("Ports", "SELECT port_code + ' - ' + port_desc as port_name,port_code FROM port WHERE elt_account_number=" + elt_account_number + " AND ISNULL(port_id,'')<>'' ORDER BY port_desc");
     feData.AddToDataSet("Countries", "SELECT * FROM country_code WHERE elt_account_number=" + elt_account_number + " order by country_name");
     feData.AddToDataSet("MOT", "SELECT code_id,code_desc FROM aes_codes WHERE code_type='Transport Code' ORDER BY code_id");
     feData.AddToDataSet("Carriers", "SELECT ISNULL(carrier_id,'') AS carrier_code,LEFT(dba_name,22) AS carrier_name FROM organization WHERE is_carrier='Y' AND ISNULL(carrier_id,'') <> '' AND ISNULL(carrier_code,'')<>'' AND elt_account_number=" + elt_account_number + " ORDER BY dba_name");
     feData.AddToDataSet("ScheduleB", "SELECT * FROM scheduleB WHERE elt_account_number=" + elt_account_number + " ORDER BY description");
     // Session["AES_DATA"] = feData;
     return(feData);
 }
Beispiel #22
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        if (hCostItem.Value != "" && hCostItem.Value != "0")
        {
            string tranStr = "";
            // Consolidated House Item
            if (txtHAWB.Text != "")
            {
                // Other Charge
                if (txtItem.Text != "")
                {
                    tranStr = "UPDATE hawb_other_charge SET cost_desc=N'" + lstCostItem.Text
                              + "',cost_code=" + hCostItem.Value + ",cost_amt=" + txtCostAmt.Text
                              + " WHERE elt_account_number=" + elt_account_number + " AND hawb_num=N'" + txtHAWB.Text
                              + "' AND tran_no=" + txtItem.Text;
                }
                // Weight Charge
                else
                {
                    tranStr = "UPDATE hawb_weight_charge SET cost_desc=N'" + lstCostItem.Text
                              + "',cost_code=" + hCostItem.Value + ",cost_amt=" + txtCostAmt.Text
                              + " WHERE elt_account_number=" + elt_account_number + " AND hawb_num=N'" + txtHAWB.Text
                              + "'";
                }
            }

            // Direct Shipment
            else
            {
                // Other Charge
                if (txtItem.Text != "")
                {
                    tranStr = "UPDATE mawb_other_charge SET cost_desc=N'" + lstCostItem.Text
                              + "',cost_code=" + hCostItem.Value + ",cost_amt=" + txtCostAmt.Text
                              + " WHERE elt_account_number=" + elt_account_number + " AND mawb_num=N'" + txtMAWB.Text
                              + "' AND tran_no=" + txtItem.Text;
                }
                // Weight Charge
                else
                {
                    tranStr = "UPDATE mawb_weight_charge SET cost_desc=N'" + lstCostItem.Text
                              + "',cost_code=" + hCostItem.Value + ",cost_amt=" + txtCostAmt.Text
                              + " WHERE elt_account_number=" + elt_account_number + " AND mawb_num=N'" + txtMAWB.Text
                              + "'";
                }
            }

            feData.DataTransaction(tranStr);

            hSaved.Value = "Y";
        }
    }
Beispiel #23
0
    protected void UpdateAES()
    {
        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        ArrayList tranStrAL = new ArrayList();
        string    tranStr   = "";

        tranStr = "SET ANSI_WARNINGS OFF";
        tranStrAL.Add(tranStr);

        tranStr = "UPDATE aes_master SET "
                  + "party_to_transaction=N'" + RCC.SelectedValue
                  + "',export_date=N'" + EDA.Text
                  + "',tran_ref_no=N'" + BN.Text
                  + "',consignee_acct=" + MakeNullCase(hConsigneeAcct.Value)
                  + ",inter_consignee_acct=" + MakeNullCase(hInterConsigneeAcct.Value)
                  + ",origin_state=N'" + ST.SelectedValue
                  + "',dest_country=N'" + COD.SelectedValue
                  + "',tran_method=N'" + MOT.SelectedValue
                  + "',export_port=N'" + POE.SelectedValue
                  + "',unloading_port=N'" + POU.SelectedValue
                  + "',carrier_id_code=N'" + lstCarrier.SelectedValue
                  + "',export_carrier=N'" + lstCarrier.Items[lstCarrier.SelectedIndex].Text
                  + "',shipment_ref_no=N'" + SRN.Text
                  + "',hazardous_materials=N'" + HAZ.SelectedValue
                  + "',route_export_tran=N'" + RT.SelectedValue
                  + "',in_bond_type=N'" + IBT.SelectedValue
                  + "',in_bond_no=N'" + IBN.Text
                  + "',ftz=N'" + FTZ.Text
                  + "',last_modified=GETDATE()"
                  + ",shipper_acct=" + MakeNullCase(hShipperAcct.Value)
                  + ",file_type=N'" + hFileType.Value
                  + "',house_num=N'" + txtHouse.Text
                  + "',master_num=N'" + txtMaster.Text
                  + "' WHERE elt_account_number=" + elt_account_number + " AND auto_uid=" + AESNO.Value;
        tranStrAL.Add(tranStr);

        // tranStr = "DELETE FROM aes_detail WHERE EmailItemID=" + EmailItemID + " AND aes_id=" + AESNO.Value;



        tranStrAL.Add(tranStr);

        if (!feData.DataTransactions((string[])tranStrAL.ToArray(typeof(string))))
        {
            txtResultBox.Text    = feData.GetLastTransactionError();
            txtResultBox.Visible = true;
        }
        else
        {
            SaveLineItems(int.Parse(AESNO.Value));
            Response.Redirect("EditAES.aspx?AESID=" + AESNO.Value);
        }
    }
Beispiel #24
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Email")
        {
            FreightEasy.DataManager.FreightEasyData fe = new FreightEasy.DataManager.FreightEasyData();
            fe.AddToDataSet("SetupSession", "SELECT * FROM setup_session WHERE sid='" + e.CommandArgument.ToString() + "'");
            DataRow dr = fe.Tables["SetupSession"].Rows[0];

            string sid                = dr["sid"].ToString();
            string email              = dr["email"].ToString();
            string password           = dr["password"].ToString();
            string elt_account_number = dr["elt_account_number"].ToString();


            string body = @"
                <html>
                <head>
                <title>FreightEasy Online Application (Setup Information)</title>
                <style type='text/css'>
	                .style3 {	
		                font-family: Verdana, Arial, Helvetica, sans-serif;	
		                font-size: 9px;}
                </style>
                </head>
                <body>
                <p class='style3'><strong>FreightEasy Online Application (Setup Information)</strong></p>
                <p />
                <table class='style3' width='100%' border='0' cellspacing='0' cellpadding='0'>
                <tr>
                <td colspan='2'>
                <a href='http://" + http_host + @"/IFF_MAIN/Authentication/SetupLogin.aspx?sid=" + sid + @"'>click to login</a>
                <p />Email Address: " + email + @"
                <p />Password: "******"</td>
                </tr>
                <tr>
                <td align='left' valign='bottom'>
                <span class='style3'>This message was sent by E-LOGISTICS TECHNOLOGY. (<a href='mailto:[email protected]'>[email protected]</a>)</span>
                </td>
                <td align='right' valign='top'>
                <a href='http://www.e-logitech.net target='_blank'><img src='http://www.e-logitech.net/elt_email/images/powered_logo.gif' width='123' height='50' border='0' /></a>
                </td>
                </tr>
                </table>
                </body>
                </html>";

            MailMessage message = new MailMessage("*****@*****.**", email, "FreightEasy Online Application (Setup Information)", body);
            message.IsBodyHtml = true;
            SmtpClient client = new SmtpClient("localhost", 25);
            client.Send(message);
        }
    }
Beispiel #25
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Remove")
        {
            string sqlStr = "DELETE FROM country_code WHERE country_code='"
                            + e.CommandArgument.ToString() + "' AND elt_account_number=" + elt_account_number;
            FreightEasy.DataManager.FreightEasyData FEData = new FreightEasy.DataManager.FreightEasyData();
            FEData.DataTransaction(sqlStr);
        }

        GridView1.DataBind();
        GridView2.DataBind();
        Initialize_Components();
    }
Beispiel #26
0
    protected void btnAddAll_Click(object sender, EventArgs e)
    {
        string sqlStr = "INSERT INTO country_code SELECT " + elt_account_number
                        + ",country_name,country_code FROM all_country_code WHERE "
                        + "country_code not in (SELECT country_code FROM country_code WHERE elt_account_number="
                        + elt_account_number + ")";

        FreightEasy.DataManager.FreightEasyData FEData = new FreightEasy.DataManager.FreightEasyData();
        FEData.DataTransaction(sqlStr);

        GridView1.DataBind();
        GridView2.DataBind();
        Initialize_Components();
    }
Beispiel #27
0
    protected void Page_Init(object sender, EventArgs e)
    {
        elt_account_number = Request.Cookies["CurrentUserInfo"]["elt_account_number"];
        user_id            = Request.Cookies["CurrentUserInfo"]["user_id"];
        user_right         = Request.Cookies["CurrentUserInfo"]["user_right"];
        login_name         = Request.Cookies["CurrentUserInfo"]["login_name"];
        string sb_id = Request.Params["SBID"];

        hOrgID.Value = Request.Params["OrgID"];

        if (sb_id == null || sb_id == "")
        {
            labelTitle.Text = "ADD NEW SCHEDULE B ITEM";
        }
        else
        {
            labelTitle.Text = "EDIT SCHEDULE B ITEM";
            hSBID.Value     = sb_id;
        }

        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        feData.AddToDataSet("ExportCode", "SELECT code_id,LEFT(code_id+'-'+CAST(code_desc AS NVARCHAR),32) AS code_desc FROM aes_codes WHERE code_type='Export Code' ORDER BY code_id");
        feData.AddToDataSet("LicenseType", "SELECT code_id,LEFT(code_id+'-'+CAST(code_desc AS NVARCHAR),32) AS code_desc FROM aes_codes WHERE code_type='License Code' ORDER BY code_id");
        feData.AddToDataSet("UOMCode", "SELECT code_id,LEFT(CAST(code_desc AS NVARCHAR),32) AS code_desc FROM aes_codes WHERE code_type='UOM' ORDER BY code_desc");

        lstSBUnit1.DataSource     = feData.Tables["UOMCode"];
        lstSBUnit1.DataTextField  = "code_desc";
        lstSBUnit1.DataValueField = "code_id";
        lstSBUnit1.DataBind();
        lstSBUnit1.Items.Insert(0, new ListItem("", ""));

        lstSBUnit2.DataSource     = feData.Tables["UOMCode"];
        lstSBUnit2.DataTextField  = "code_desc";
        lstSBUnit2.DataValueField = "code_id";
        lstSBUnit2.DataBind();
        lstSBUnit2.Items.Insert(0, new ListItem("", ""));

        lstExportCode.DataSource     = feData.Tables["ExportCode"];
        lstExportCode.DataTextField  = "code_desc";
        lstExportCode.DataValueField = "code_id";
        lstExportCode.DataBind();
        lstExportCode.Items.Insert(0, new ListItem("", ""));

        lstLicenseType.DataSource     = feData.Tables["LicenseType"];
        lstLicenseType.DataTextField  = "code_desc";
        lstLicenseType.DataValueField = "code_id";
        lstLicenseType.DataBind();
        lstLicenseType.Items.Insert(0, new ListItem("", ""));
    }
Beispiel #28
0
    protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Add")
        {
            string sqlStr = "INSERT INTO country_code SELECT " + elt_account_number
                            + ",country_name,country_code FROM all_country_code WHERE country_code='"
                            + e.CommandArgument.ToString() + "'";
            FreightEasy.DataManager.FreightEasyData FEData = new FreightEasy.DataManager.FreightEasyData();
            FEData.DataTransaction(sqlStr);
        }

        GridView1.DataBind();
        GridView2.DataBind();
        Initialize_Components();
    }
Beispiel #29
0
 protected void CheckExistingAES()
 {
     if (AESID == "" || AESID == "0")
     {
         string aesFindSQL = @"SELECT * FROM aes_master WHERE elt_account_number=" + elt_account_number
                             + " AND file_type='OE' AND house_num=N'" + txtHouse.Text + "' AND master_num=N'" + txtMaster.Text + "'";
         FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
         feData.AddToDataSet("AESEntity", aesFindSQL);
         if (feData.Tables["AESEntity"].Rows.Count > 0)
         {
             DataRow drTmp = feData.Tables["AESEntity"].Rows[0];
             AESID = drTmp["auto_uid"].ToString();
         }
     }
 }
Beispiel #30
0
    protected string GetAgentInfo()
    {
        string agent_info = "";

        FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData();
        feData.AddToDataSet("AgentInfo", "SELECT * FROM agent WHERE elt_account_number=" + elt_account_number);

        if (feData.Tables["AgentInfo"].Rows.Count > 0)
        {
            DataRow dr = feData.Tables["AgentInfo"].Rows[0];
            agent_info = dr["dba_name"] + "\n" + dr["business_address"] + "\n" + dr["business_city"] + "," +
                         dr["business_state"] + " " + dr["business_zip"] + " " + dr["business_country"];
        }

        return(agent_info);
    }