Exemplo n.º 1
0
    public void Load_PortList()
    {
        DataTable dt = objPortCall.Get_PortCall_PortList(0, UDFLib.ConvertIntegerToNull(DDLVesselFilter.SelectedValue), 1);

        if (dt.Rows.Count > 0)
        {
            DDLPort.DataSource     = dt;
            DDLPort.DataTextField  = "Port_Name";
            DDLPort.DataValueField = "Port_ID";
            DDLPort.DataBind();
            btnsave.Enabled = true;
        }
        else
        {
            DDLPort.DataSource     = dt;
            DDLPort.DataTextField  = "Port_Name";
            DDLPort.DataValueField = "Port_ID";
            DDLPort.DataBind();
            btnsave.Enabled = false;
        }
        DataTable dtport = objBLLPort.Get_PortList_Mini();

        ddlportfilter.DataSource     = dtport;
        ddlportfilter.DataTextField  = "Port_Name";
        ddlportfilter.DataValueField = "Port_ID";
        ddlportfilter.DataBind();
        ddlportfilter.Items.Insert(0, new ListItem("All Port", "0"));

        ddlPortCost.DataSource     = dtport;
        ddlPortCost.DataTextField  = "Port_Name";
        ddlPortCost.DataValueField = "Port_ID";
        ddlPortCost.DataBind();
        ddlPortCost.Items.Insert(0, new ListItem("All Port", "0"));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            btnSendPO.Attributes.Add("onclick", "Async_Get_Reqsn_Validity('" + Request.QueryString["Requisitioncode"] + "');return Validation();");
            //Session["VESSELCODE"] = Request.QueryString["Vessel_Code"].ToString();
            //Session["DOCCODE"] = Request.QueryString["Document_Code"].ToString();
            TypeOpen = Request.QueryString["Type"].ToString();

            BindGrid();
            BindRequisitionInfo();

            divApprove.Visible    = false;
            divpurcomment.Visible = false;
            BLL_PURC_Purchase objport = new BLL_PURC_Purchase();
            DDLPort.DataSource = objport.getDeliveryPort();
            DDLPort.DataBind();
            DDLPort.Items.Insert(0, new ListItem("SELECT", "0"));
            BLL_Crew_CrewDetails objCrew = new BLL_Crew_CrewDetails();
            gvPortCalls.DataSource = objCrew.Get_PortCall_List(Convert.ToInt32(Request.QueryString["Vessel_Code"].ToString()));
            gvPortCalls.DataBind();
            DataTable dt = objport.SelectSupplier();
            dt.DefaultView.RowFilter = "SUPPLIER_CATEGORY='A'";

            ddlSentFrom.DataTextField  = "SUPPLIER_NAME";
            ddlSentFrom.DataValueField = "SUPPLIER";
            ddlSentFrom.DataSource     = dt.DefaultView.ToTable();
            ddlSentFrom.DataBind();
            ddlSentFrom.Items.Insert(0, new ListItem("SELECT", "0"));
        }
        //hlinkViewEval.NavigateUrl = "Quotation_Evaluation_Report.aspx?Requisitioncode=" + Request.QueryString["Requisitioncode"].ToString() + "&Document_Code=" + Request.QueryString["Document_Code"].ToString() + "&Vessel_Code=" + Request.QueryString["Vessel_Code"];
        hlinkViewEval.NavigateUrl = "QuotationEvalRpt.aspx?Requisitioncode=" + Request.QueryString["Requisitioncode"].ToString() + "&Document_Code=" + Request.QueryString["Document_Code"].ToString() + "&Vessel_Code=" + Request.QueryString["Vessel_Code"];
    }
Exemplo n.º 3
0
    public void Load_PortList()
    {
        DataTable dt = objBLLPort.Get_PortList_Mini();

        DDLPort.DataSource     = dt;
        DDLPort.DataTextField  = "Port_Name";
        DDLPort.DataValueField = "Port_ID";
        DDLPort.DataBind();
        DDLPort.Items.Insert(0, new ListItem("-Select-", "0"));
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblheader.Text = "Raise PO for Logistic ID : " + Request.QueryString["LOG_ID"];
            DataTable dtPoList = BLL_PURC_LOG.Get_Log_POList_Raise(Convert.ToInt32(Request.QueryString["LOG_ID"]));
            gvLPOList.DataSource = dtPoList;
            gvLPOList.DataBind();

            btnSendOrder.Visible = true;

            dvRaiselPo.Visible = false;
            BLL_PURC_Purchase objport = new BLL_PURC_Purchase();
            DDLPort.DataSource = objport.getDeliveryPort();
            DDLPort.DataBind();
            BLL_Crew_CrewDetails objCrew = new BLL_Crew_CrewDetails();
            //DataSource = objCrew.Get_PortCall_List(Convert.ToInt32(Request.QueryString["Vessel_Code"].ToString()));
            //gvPortCalls.DataBind();
            DataTable dt = objport.SelectSupplier();
            dt.DefaultView.RowFilter = "SUPPLIER_CATEGORY='A'";

            ddlSentFrom.DataTextField  = "SUPPLIER_NAME";
            ddlSentFrom.DataValueField = "SUPPLIER";
            ddlSentFrom.DataSource     = dt.DefaultView.ToTable();
            ddlSentFrom.DataBind();
            ddlSentFrom.Items.Insert(0, new ListItem("SELECT", "0"));

            ListItem liDDl = new ListItem();
            liDDl = DDLPort.Items.FindByValue(dtPoList.Rows[0]["port"].ToString());
            if (liDDl != null)
            {
                liDDl.Selected = true;
            }

            liDDl = ddlSentFrom.Items.FindByValue(dtPoList.Rows[0]["Agent"].ToString());
            if (liDDl != null)
            {
                liDDl.Selected = true;
                if (Convert.ToString(dtPoList.Rows[0]["Agent"]) != "0")
                {
                    DataTable dtAgentsDtls = BLL_PURC_Common.Get_SupplierDetails_ByCode(dtPoList.Rows[0]["Agent"].ToString());
                    if (dtAgentsDtls.Rows.Count > 0)
                    {
                        txtagent.Text  = dtAgentsDtls.Rows[0]["fullname"].ToString();
                        txtagent.Text += "\r\n" + dtAgentsDtls.Rows[0]["address"].ToString();
                        txtagent.Text += "\r\n" + dtAgentsDtls.Rows[0]["phone"].ToString();
                        txtagent.Text += "\r\n" + dtAgentsDtls.Rows[0]["email"].ToString();
                    }
                }
            }
        }
    }
Exemplo n.º 5
0
 /// <summary>
 /// Bind the port dropdown
 /// </summary>
 protected void BindPort()
 {
     try
     {
         DDLPort.DataSource     = objInfra.Get_PortList();
         DDLPort.DataValueField = "PORT_ID";
         DDLPort.DataTextField  = "PORT_NAME";
         DDLPort.DataBind();
         DDLPort.Items.Insert(0, new ListItem("-SELECT-", "0"));
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
     }
 }
Exemplo n.º 6
0
 private void BindPorts()
 {
     try
     {
         BLL_Infra_Port objBLLPort = new BLL_Infra_Port();
         DataTable      dt         = objBLLPort.Get_PortList_Mini();
         DDLPort.DataTextField  = "Port_Name";
         DDLPort.DataValueField = "Port_ID";
         DDLPort.DataSource     = dt;
         DDLPort.DataBind();
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
     }
 }
    private void BindDeliveryNumber(DataTable dts)
    {
        try
        {
            var r = from d in dts.AsEnumerable()
                    select d;
            DataTable dt = r.CopyToDataTable();

            BLL_Infra_Port objBLLPort = new BLL_Infra_Port();
            //DataTable dt = objBLLPort.Get_PortList_Mini();
            DDLPort.DataTextField  = "DELIVERY_CODE";
            DDLPort.DataValueField = "DELIVERY_CODE";
            DDLPort.DataSource     = dt;
            DDLPort.DataBind();
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
Exemplo n.º 8
0
 protected void FillPort()
 {
     try
     {
         using (BLL_PURC_Purchase objTechService = new BLL_PURC_Purchase())
         {
             DataTable PortDS = objTechService.getDeliveryPort();
             DDLPort.DataSource     = PortDS;
             DDLPort.DataTextField  = "Port_Name";
             DDLPort.DataValueField = "Id";
             DDLPort.DataBind();
         }
     }
     catch (Exception ex)
     {
         //.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex);
     }
     finally
     {
     }
 }
Exemplo n.º 9
0
    protected void lnkSelect_Click(object s, EventArgs e)
    {
        try
        {
            lblOnerCharts.Text = "";
            GridViewRow gr = (GridViewRow)((ImageButton)s).Parent.Parent;
            txteta.Text = ((Label)gr.FindControl("lblArrival")).Text;
            txtetd.Text = ((Label)gr.FindControl("lblDeparture")).Text;
            DDLPort.ClearSelection();
            DDLPort.Items.FindByValue(((HiddenField)gr.FindControl("hdnPortID")).Value).Selected = true;
            string suppCode = ((Label)gr.FindControl("lblOwners_Agent")).ToolTip;

            // if owner agent is null then select charts agent
            if (suppCode == "")
            {
                suppCode = ((Label)gr.FindControl("lblCharterers_Agent")).ToolTip;
                if (suppCode != "")
                {
                    lblOnerCharts.Text = "Charterer's Agent";
                }
            }

            if (suppCode.Trim() != "")
            {
                DataTable dtSuppDtl = BLL_PURC_Common.Get_SupplierDetails_ByCode(suppCode);
                txtagent.Text  = dtSuppDtl.Rows[0]["fullname"].ToString() + "\r\n";
                txtagent.Text += dtSuppDtl.Rows[0]["address"].ToString() + "\r\n";
                txtagent.Text += dtSuppDtl.Rows[0]["phone"].ToString() + "\r\n";
                txtagent.Text += dtSuppDtl.Rows[0]["email"].ToString() + "\r\n";
            }
        }
        catch (Exception ex)
        {
            string js = "alert(" + ex.Message + ")";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "js1", js, true);
        }
    }
Exemplo n.º 10
0
    protected void gvInspecrionSchedule_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName == "onDelete")
            {
                objInsp.Del_ScheduledInspection(UDFLib.ConvertIntegerToNull(e.CommandArgument.ToString()), UDFLib.ConvertIntegerToNull(Session["USERID"]));
                Load_Current_Schedules();
            }
            if (e.CommandName == "ReOpen")
            {
                ViewState["SchDetailId"] = UDFLib.ConvertToInteger(e.CommandArgument.ToString().Split(';')[0]);;
            }
            if (e.CommandName.ToUpper() == "EDIT_SCHEDULE")
            {
            }
            if (e.CommandName.ToUpper() == "INSPUPD")
            {
                if (ViewState["edit"].ToString() == "0")
                {
                    btnUpdateInspection.Enabled = false;
                }

                ViewState["ShowImages"]  = 0;
                ViewState["SchDetailId"] = 1;
                string js;

                DataTable dtSup = objInsp.Get_Supritendent_Users(null, UDFLib.ConvertToInteger(e.CommandArgument.ToString().Split(';')[8]));

                if (dtSup != null)
                {
                    if (dtSup.Rows.Count > 0)
                    {
                        DDLInspectorA.DataSource     = dtSup;
                        DDLInspectorA.DataTextField  = "Name";
                        DDLInspectorA.DataValueField = "UserID";
                        DDLInspectorA.DataBind();
                        DDLInspectorA.Items.Insert(0, new ListItem("--SELECT--", null));
                        txtInsectionDate.Text = DateTime.Now.ToString("dd/MMM/yy");


                        ViewState["ScheduleID"]  = UDFLib.ConvertToInteger(e.CommandArgument.ToString().Split(';')[0]);
                        ViewState["SchDetailId"] = UDFLib.ConvertToInteger(e.CommandArgument.ToString().Split(';')[2]);
                        try
                        {
                            try
                            {
                                DDLInspectorA.SelectedValue = e.CommandArgument.ToString().Split(';')[1];
                            }
                            catch (Exception)
                            {
                                DDLInspectorA.SelectedValue = e.CommandArgument.ToString().Split(';')[4];
                            }
                        }
                        catch (Exception)
                        {
                            DDLInspectorA.SelectedIndex = 0;
                        }

                        try
                        {
                            txtInsectionDate.Text = Convert.ToDateTime(e.CommandArgument.ToString().Split(';')[5]).ToString("dd/MMM/yy");
                        }
                        catch (Exception)
                        {
                            txtInsectionDate.Text = Convert.ToDateTime(e.CommandArgument.ToString().Split(';')[6]).ToString("dd/MMM/yy");
                        }

                        try
                        {
                            hdfNewinspectionPortid.Value = "";
                            DataSet   dtAssignPortList = objInsp.INSP_Get_InspectionPort(UDFLib.ConvertToInteger(e.CommandArgument.ToString().Split(';')[2]));
                            DataTable dtPort           = objInfra.Get_PortList();

                            DDLPort.DataSource     = dtPort;
                            DDLPort.DataValueField = "PORT_ID";
                            DDLPort.DataTextField  = "PORT_NAME";
                            DDLPort.DataBind();
                            DDLPort.Items.Insert(0, new ListItem("-SELECT-", null));

                            if (dtAssignPortList.Tables[0].Rows.Count > 0)
                            {
                                try
                                {
                                    DDLPort.SelectedValue = dtAssignPortList.Tables[0].Rows[0]["PortID"].ToString();
                                }
                                catch { }
                            }
                        }
                        catch (Exception ex)
                        {
                            throw ex;
                        }


                        txtDurJobsU.Text = e.CommandArgument.ToString().Split(';')[7].ToString();
                        txtDuration.Text = e.CommandArgument.ToString().Split(';')[7].ToString();
                        DateTime dt = Convert.ToDateTime(txtInsectionDate.Text);
                        dt = dt.AddDays(UDFLib.ConvertToDouble(txtDuration.Text) - 1);
                        txtCompletionDate.Text = dt.ToString("dd/MMM/yy");
                        txtOnboard.Text        = "";
                        txtOnShore.Text        = "";
                        txtDuration.Text       = "";
                        rdbCompleted.Checked   = false;
                        rdbPlanned.Checked     = true;

                        js = " $('#divAddSystem').prop('title', 'Update Inspection');showModal('dvUpdateInspe',false);";
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "showModalJS", js, true);

                        js = " $('#dvUpdateInspe').prop('title', 'Update Inspection');";
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "", js, true);

                        js = "handleStatus();";
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "handleModal", js, true);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }