Exemple #1
0
    private void FillData(int _iGantryID)
    {
        CGantry Gantry = CGantry.GetGantry(_iGantryID);

        if (Gantry != null)
        {
            txtGantryID.Text    = Gantry.GantryID.ToString();
            txtGantryName.Text  = Gantry.Gantry_Name;
            txtGantryDesc.Text  = Gantry.Gantry_Desc;
            txtGpsLocation.Text = Gantry.Gantry_GPSLocation;
            txtTRateID.Text     = Gantry.TRateID.ToString();
            txtROfficeID.Text   = Gantry.ROfficeID.ToString();
        }
    }
Exemple #2
0
    protected void btnEditGantry_Click(object sender, EventArgs e)
    {
        int GantryEdited = CGantry.MaintainGantry(Convert.ToInt32(txtGantryID.Text),
                                                  txtGantryName.Text,
                                                  txtGantryDesc.Text,
                                                  txtGpsLocation.Text,
                                                  Convert.ToInt32(txtTRateID.Text),
                                                  Convert.ToInt32(txtROfficeID.Text));

        if (GantryEdited == 1)
        {
            Response.Redirect("~/DataCapturer/ViewGantries.aspx");
        }
        else
        {
            lblStatus.Text      = "Gantry could not be edited.";
            lblStatus.ForeColor = System.Drawing.Color.Red;
            lblStatus.Font.Size = 12;
        }
    }