Exemplo n.º 1
0
 public void UserControl_ucPortCalls_Select(PortCalls objPortCall)
 {
     try
     {
         string js = "parent.HidePortCall('" + ViewState["VesselID"].ToString() + "','" + ViewState["TypeID"].ToString() + "','" + ViewState["Date"].ToString() + "','" + ViewState["Questionnaire"].ToString() + "','" + ViewState["OilMajor"].ToString() + "','" + ViewState["Inspector"].ToString() + "','" + objPortCall.Port_ID + "','" + objPortCall.Port_Call_ID + "','" + ViewState["NoDays"].ToString() + "','" + ViewState["RespNextDue"].ToString() + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "js1", js, true);
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
     }
 }
Exemplo n.º 2
0
    public void lnkSelect_Click(object s, EventArgs e)
    {
        GridViewRow gr = (GridViewRow)((ImageButton)s).Parent.Parent;

        PortCalls objp = new PortCalls();

        objp.Arrival_Date          = UDFLib.ConvertDateToNull((gr.FindControl("lblArrival") as Label).Text);
        objp.Charterers_Agent_Code = ((Label)gr.FindControl("lblCharterers_Agent")).ToolTip;;
        objp.Charterers_Agent_Name = ((Label)gr.FindControl("lblCharterers_Agent")).Text;;
        objp.Departure_Date        = UDFLib.ConvertDateToNull((gr.FindControl("lblDeparture") as Label).Text);
        objp.Owners_Agent_Code     = ((Label)gr.FindControl("lblOwners_Agent")).ToolTip;
        objp.Owners_Agent_Name     = ((Label)gr.FindControl("lblOwners_Agent")).Text;;
        objp.Port_Call_ID          = UDFLib.ConvertToInteger(gvPortCalls.DataKeys[gr.RowIndex].Values["Port_Call_ID"]);
        objp.Port_Name             = (gr.FindControl("lblPort_Name") as Label).Text;
        objp.Port_ID = UDFLib.ConvertToInteger((gr.FindControl("hdnPortID") as HiddenField).Value);

        Select(objp);
    }