public void btnVoid_Click()
    {
        string seedid = hidSeed.Text;

        if (!VoidCheckAC.CheckisAC("OI", hidSeed.Text))
        {
            X.MessageBox.Alert("Status", VoidCheckAC.Message).Show();
            return;
        }


        if (seedid.Length > 1)
        {
            string  voidflag = hidVoid.Text == "0" ? "Y" : "N";
            DataSet l        = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_CallVoid_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "O").Append("Type", "HBL").Append("VoidFlag", voidflag)
                .Append("seed", hidSeed.Text == ""?null:hidSeed.Text)
            }).GetList();
            if (l != null && l.Tables[0].Rows[0][0].ToString() == "Y")
            {
                X.AddScript("$('#img_void').css('display','inline');");
                btnSave.Disabled   = true;
                btnCancel.Disabled = true;
                btnNext.Disabled   = true;
                btnVoid.Text       = "Active";
                hidVoid.Text       = "1";
                X.AddScript("$('#showContainer').hide();");
            }
            else if (l != null && l.Tables[0].Rows[0][0].ToString() == "N")
            {
                X.AddScript("$('#img_void').css('display','none');");
                btnSave.Disabled   = false;
                btnCancel.Disabled = false;
                btnNext.Disabled   = false;
                btnVoid.Text       = "Void";
                hidVoid.Text       = "0";
                X.AddScript("$('#showContainer').show();");
            }
            else if (l != null && l.Tables[0].Rows[0][0].ToString() == "S")
            {
                X.Msg.Alert("Information", "HBL can't be active,because MBL is void.").Show();
            }
            else
            {
                ControlBinder.pageTitleMsg(false, "OI-H:" + labImpLotNo.Text, "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom);
            }

            DataBindList();
            ControlBinder.pageTitleMsg(true, "OI-H:" + labImpLotNo.Text, "<p>Status : Edit HBL of  <span>" + labImpLotNo.Text + "</span>. </p>", div_bottom);
        }
    }
Exemplo n.º 2
0
    public void btnVoid_Click()
    {
        string seedid = hidSeed.Text;

        if (!VoidCheckAC.CheckisAC("AI", hidSeed.Text))
        {
            X.MessageBox.Alert("Status", VoidCheckAC.Message).Show();
            return;
        }

        if (seedid.Length > 1)
        {
            string  voidflag = hidVoid.Text == "0" ? "Y" : "N";
            DataSet l        = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_CallVoid_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "A").Append("Type", "MAWB").Append("VoidFlag", voidflag)
                .Append("seed", hidSeed.Text == ""?null:hidSeed.Text)
            }).GetList();
            if (l != null && l.Tables[0].Rows[0][0].ToString() == "Y")
            {
                X.AddScript("$('#img_void').css('display','inline');");
                btnSave.Disabled   = true;
                btnCancel.Disabled = true;
                btnNext.Disabled   = true;
                btnVoid.Text       = "Active";
                hidVoid.Text       = "1";
                X.AddScript("$('#showHBL').hide();");
                btnUpdateLotNo.Hide();
            }
            else if (l != null && l.Tables[0].Rows[0][0].ToString() == "N")
            {
                X.AddScript("$('#img_void').css('display','none');");
                btnSave.Disabled   = false;
                btnCancel.Disabled = false;
                btnNext.Disabled   = false;
                btnVoid.Text       = "Void";
                hidVoid.Text       = "0";
                X.AddScript("$('#showHBL').show();");
            }
            else
            {
                ControlBinder.pageTitleMsg(false, "AI-M:" + labLotNo.Text, "<p class=\"error\"> Status : Saving  failed  ! ! !   </p>", div_bottom);
            }
            DataBinder();
            StoreInvoice.DataSource = GetList("FW_AirImport_Invoice_SP", "List", "inv_Seed", hidSeed.Text);
            StoreInvoice.DataBind();
            ControlBinder.pageTitleMsg(true, "AI-M:" + labLotNo.Text, "<p>Status :  Edit  MAWB  of <span>" + labLotNo.Text + "</span></p>", div_bottom);
        }
    }
Exemplo n.º 3
0
    public void btnVoid_Click()
    {
        string seedid = hidSeed.Text;

        if (!VoidCheckAC.CheckisAC("AE", hidSeed.Text))
        {
            X.MessageBox.Alert("Status", VoidCheckAC.Message).Show();
            return;
        }


        if (seedid.Length > 1)
        {
            string  voidflag = hidVoid.Text == "0" ? "Y1" : "N1";
            DataSet l        = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_CallVoid_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "A").Append("Type", "MAWB").Append("VoidFlag", voidflag)
                .Append("seed", hidSeed.Text == ""?null:hidSeed.Text)
            }).GetList();
            if (l != null && l.Tables[0].Rows[0][0].ToString() == "Y")
            {
                X.AddScript("$('#img_void').css('display','inline');");
                btnSave.Disabled   = true;
                btnCancel.Disabled = true;
                btnRevert.Disabled = true;
                btnVoid.Text       = "Active";
                hidVoid.Text       = "1";
                X.AddScript("$('#showGenerate').hide();");
                btnUpdateLotNo.Hide();
            }
            else if (l != null && l.Tables[0].Rows[0][0].ToString() == "N")
            {
                X.AddScript("$('#img_void').css('display','none');");
                btnSave.Disabled   = false;
                btnCancel.Disabled = false;
                btnRevert.Disabled = false;
                X.AddScript("$('#showGenerate').show();");
                btnVoid.Text = "Void";
                hidVoid.Text = "0";
            }
            else
            {
                ControlBinder.pageTitleMsg(false, showname + hidLotNo.Text, "<p class=\"error\">Status :  Void failed, please check the data . </p>", div_bottom);
            }
            DataBindList();
            ControlBinder.pageTitleMsg(true, showname + ":" + hidLotNo.Text, "<p>Status :  Edit  No. of  <span>" + hidLotNo.Text + "</span></p>", div_bottom);
        }
    }