Example #1
0
    protected void btnsubmit_Click(object sender, EventArgs e)
    {
        P.AdminInsertongoingassignedon    = Convert.ToDateTime(txtassignedon.Value);
        P.AdminInsertongoingestimatedtime = Convert.ToDateTime(txtassignedon.Value).AddDays(1);
        P.AdminInsertongoingrider         = Convert.ToInt32(ddlrider.SelectedValue);
        P.AdminInsertongoingcreatedby     = Convert.ToInt32(Session["username"]);
        P.AdminInsertongoingshipment      = Convert.ToInt32(ddlshipment.SelectedValue);
        P.AdminFetchID = Convert.ToInt32(ddlshipment.SelectedValue);
        dt             = F.AdminFetchcheckongoingstep(P);
        if (dt.Rows[0][0] != null)
        {
            insert.AdminInsertongoingstep(P);
        }

        else
        {
        }
    }
Example #2
0
    protected void btnsubmit_Click(object sender, EventArgs e)
    {
        if (Request.Form["chkPassPort"] != null)
        {
            if (Request.Form["chkPassPort"] == "delivered")
            {
                ddlreason.SelectedIndex           = -1;
                txtreturned.Value                 = null;
                txtdescription.Value              = null;
                P.AdminInsertdelivereddeliveredon = Convert.ToDateTime(txtdelivered.Value);
                P.AdminInsertdeliveredshipment    = Convert.ToInt32(ddlshipment.SelectedValue);
                P.AdminInsertdeliveredcreatedby   = Convert.ToInt32(Session["username"]);
                P.AdminFetchID = Convert.ToInt32(ddlshipment.SelectedValue);
                dt2            = F.AdminFetchcheckongoingstep(P);
                dt3            = F.AdminFetchcheckdeliveredstep(P);
                if (dt2.Rows[0][0] != null)
                {
                    P.AdminInsertdeliveredRider = Convert.ToInt32(dt2.Rows[0][0]);

                    if (dt3.Rows[0][0] != null)
                    {
                        insert.AdminInsertdeliveredstep(P);
                    }

                    else
                    {
                    }
                }

                else
                {
                }
            }

            else if (Request.Form["chkPassPort"] == "returned")
            {
                txtdelivered.Value              = null;
                P.AdminInsertreturnerturnon     = Convert.ToDateTime(txtreturned.Value);
                P.AdminInsertreturncreatedby    = Convert.ToInt32(Session["username"]);
                P.AdminInsertreturnshipment     = Convert.ToInt32(ddlshipment.SelectedValue);
                P.AdminInsertreturnreason       = Convert.ToInt32(ddlreason.SelectedValue);
                P.AdminInsertreturndisccription = txtdescription.InnerText;
                P.AdminFetchID = Convert.ToInt32(ddlshipment.SelectedValue);
                dt             = F.AdminFetchcheckreturnstep(P);

                if (dt2.Rows[0][0] != null)
                {
                    P.AdminInsertreturnrider = Convert.ToInt32(dt2.Rows[0][0]);

                    if (dt.Rows[0][0] != null)
                    {
                        insert.AdminInsertReturnstep(P);
                    }

                    else
                    {
                    }
                }

                else
                {
                }
            }
        }
    }