Exemplo n.º 1
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (RadioButtonList4.SelectedIndex < 0)
     {
         errorDiv4.InnerText = "Please select an answer";
     }
     else if (RadioButtonList4.SelectedIndex == 2)
     {
         score++;
         questionsAnswered++;
         Button2.Enabled = false;
         RadioButtonList4.Items.FindByValue("correct").Attributes.Add("class", "right");
         basterd.Visible  = true;
         basterdA.Text    = "That's right! The one and only Brad Pitt as First Lieutenant Aldo Raine.";
         basterdA.Visible = true;
         UpdatePanel13.Update();
         UpdatePanel15.Update();
         UpdatePanel14.Update();
     }
     else
     {
         questionsAnswered++;
         Button2.Enabled = false;
         RadioButtonList4.SelectedItem.Attributes.Add("class", "wrong");
         RadioButtonList4.Items.FindByValue("correct").Attributes.Add("class", "right");
         basterd.Visible  = true;
         basterdA.Text    = "I understand.. It's getting a bit tougher.. It was Brad Pitt as First Lieutenant Aldo Raine in Inglourious Basterds";
         basterdA.Visible = true;
         UpdatePanel13.Update();
         UpdatePanel14.Update();
         UpdatePanel15.Update();
     }
 }
Exemplo n.º 2
0
 protected void SummitAuditReject_Click(object sender, EventArgs e)
 {
     dp.Update_State_AuditReject(new Guid(PPID.Text));
     Panel14.Visible = false;
     UpdatePanel14.Update();
     GridView1.DataSource = dp.Query_DefectProduct(new Guid(PPID.Text));
     GridView1.DataBind();
     UpdatePanel2.Update();
 }
Exemplo n.º 3
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "setorder")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;

            GridView1.SelectedIndex = row.RowIndex;
            PPID.Text       = e.CommandArgument.ToString();
            Panel9.Visible  = true;
            Panel10.Visible = true;

            GridView4.DataSource = dp.Query_ConnectedWorkOrder(new Guid(PPID.Text));
            GridView4.DataBind();
            GridView5.DataSource = dp.Query_WorkOrder(TextBox20.Text);
            GridView5.DataBind();
            UpdatePanel9.Update();
            UpdatePanel10.Update();
        }

        if (e.CommandName == "getorder")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            PPID.Text            = e.CommandArgument.ToString();
            Panel9.Visible       = false;
            Panel10.Visible      = false;
            Panel12.Visible      = true;
            GridView9.DataSource = dp.Query_ConnectedWorkOrder(new Guid(PPID.Text));
            GridView9.DataBind();
            UpdatePanel12.Update();
            UpdatePanel10.Update();
            UpdatePanel9.Update();
        }
        if (e.CommandName == "setview")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            PPID.Text = e.CommandArgument.ToString();
            DropDownList3.Items.Clear();

            SqlDataReader myReader = dp.Query_CapableDep(new Guid(PPID.Text));

            SqlDataReader myReader2 = dp.Query_CapableDepDone(new Guid(PPID.Text));


            while (myReader.Read())
            {
                string a = myReader["BDOS_Name"].ToString();

                if (Session["Department"].ToString().Contains(myReader["BDOS_Name"].ToString()))
                {
                    DropDownList3.Items.Add(new ListItem(myReader["BDOS_Name"].ToString(), myReader["PPDS_ID"].ToString()));//增加Item
                }
            }



            while (myReader2.Read())
            {
                ListItem li = DropDownList3.Items.FindByText(myReader2["BDOS_Name"].ToString());
                DropDownList3.Items.Remove(li);
            }
            if (DropDownList3.Items.Count > 0)
            {
                Panel11.Visible = true;
                UpdatePanel11.Update();
            }
            else
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('处理意见已填写或您没有相应的权限!')", true);
            }
        }
        if (e.CommandName == "getview")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            PPID.Text             = e.CommandArgument.ToString();
            GridView10.DataSource = dp.GetAuditSuggest(new Guid(PPID.Text));
            GridView10.DataBind();
            Panel15.Visible = true;
            UpdatePanel15.Update();
        }
        if (e.CommandName == "track")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            PPID.Text = e.CommandArgument.ToString();

            Panel13.Visible = true;
            Panel14.Visible = false;
            Panel15.Visible = false;

            UpdatePanel13.Update();
            UpdatePanel14.Update();
            UpdatePanel15.Update();
        }
        if (e.CommandName == "audit")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            PPID.Text            = e.CommandArgument.ToString();
            GridView8.DataSource = dp.GetAuditSuggest(new Guid(PPID.Text));
            GridView8.DataBind();
            Panel14.Visible = true;
            UpdatePanel14.Update();
        }
        if (e.CommandName == "mod")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            switchlabel.Text        = "修改";
            PPID.Text      = e.CommandArgument.ToString();
            Panel3.Visible = true;
            UpdatePanel3.Update();
            UpdatePanel4.Update();
        }
        if (e.CommandName == "del")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            PPID.Text = e.CommandArgument.ToString();
            dp.Delete_DefectProduct(new Guid(PPID.Text));
            GridView1.DataSource = dp.Query_DefectProduct();

            GridView1.DataBind();
            Panel4.Visible  = false;
            Panel10.Visible = false;
            Panel14.Visible = false;
            UpdatePanel2.Update();
            UpdatePanel3.Update();
            UpdatePanel4.Update();
            UpdatePanel10.Update();
            UpdatePanel14.Update();
        }
    }
Exemplo n.º 4
0
 protected void CloseAudit_Click(object sender, EventArgs e)
 {
     Panel14.Visible = false;
     UpdatePanel14.Update();
 }
Exemplo n.º 5
0
    protected void BtnGetDCDetails_Click(object sender, EventArgs e)
    {
        String cd = "";

        ModalPopUpDocNum.Hide();
        Session["tempDCData"] = null;

        int DocNum = Convert.ToInt32(ddldocno.SelectedValue);


        //  bool condition = false;
        cd = "1";
        DataSet   ds     = DCMaster.Get_DCMasterBy_DocNum(DocNum, "1");
        DataTable dt     = ds.Tables[0];
        DataTable dtzone = ds.Tables[2];

        cd = "2";
        if (dt.Rows.Count > 0)
        {
            txtdocnew.Text   = dt.Rows[0]["DocumentNo_New"].ToString();
            txtdoc.Text      = dt.Rows[0]["DocumentNo"].ToString();
            txtchalan.Text   = dt.Rows[0]["ChallanNo"].ToString();
            txtChalDate.Text = dt.Rows[0]["ChallanDate"].ToString();
            txtorder.Text    = dt.Rows[0]["OrderNo"].ToString();
            txtcustomer.Text = dt.Rows[0]["CustCode"].ToString();
            lblCustName.Text = dt.Rows[0]["CustName"].ToString();
            DDlemployee.Items.Clear();
            cd = "3";
            try
            {
                DDlemployee.DataSource = DCMaster.Get_Employee_By_Customer_Code(txtcustomer.Text.ToString(), "Employee");
                DDlemployee.DataBind();
                cd = "4";
                if (DDlemployee.Items.Count > 0)
                {
                    DDlemployee.SelectedValue = dt.Rows[0]["SalesmanCode"].ToString();
                    cd = "5";
                    DDlemployee.SelectedItem.Text = dt.Rows[0]["SalesmanName"].ToString();
                    cd = "6";
                }
                txtOrdDate.Text    = dt.Rows[0]["OrderDate"].ToString();
                txtdocDate.Text    = dt.Rows[0]["DocumentDate"].ToString();
                txtpIncharge.Text  = dt.Rows[0]["PIncharge"].ToString();
                txtspInstruct.Text = dt.Rows[0]["SpInstruction"].ToString();
                txtbankdet.Text    = dt.Rows[0]["BankCode"].ToString();
                lblbankname.Text   = dt.Rows[0]["BankName"].ToString();
                cd = "7";
                //Extra Zone Code Bind
                if (dtzone.Rows.Count > 0)
                {
                    lblZoneCode.Visible = true;
                    DDLZone.Visible     = true;
                    DDLZone.Items.Clear();
                    DDLZone.DataSource = ds.Tables[2];
                    DDLZone.DataBind();
                    if (dt.Rows[0]["ExtraZoneCode"].ToString() != "")
                    {
                        //DDLZone.SelectedValue = dt.Rows[0]["ExtraZoneCode"].ToString();
                    }
                }
                else
                {
                    DDLZone.Items.Clear();
                    lblZoneCode.Visible = false;
                    DDLZone.Visible     = false;
                }


                txtDeliverydte.Text = Convert.ToDateTime(DCMaster.Get_DCMasterBy_DocNum(DocNum, "0").Tables[1].Rows[0]["DeliveryDate"].ToString()).ToString("dd/MM/yyyy");
                UpdatePanel14.Update();
            }
            catch (Exception ex)
            {
                MessageBox(cd);
                //Response.Write(ex.Message.ToString());
            }

            // Bind_DDL_Transport();
            //  Ddltransport.SelectedValue = dt.Rows[0]["TransportID"].ToString();
            if (dt.Rows[0]["TransporterCode"].ToString() == "Trans")
            {
                lbltransporter.Visible = false;
                lbltransporter.Text    = dt.Rows[0]["TransporterCode"].ToString();

                txttransporter.Text = dt.Rows[0]["Transporter"].ToString();
            }
            else
            {
                txttransporter.Text    = dt.Rows[0]["TransporterCode"].ToString();
                lbltransporter.Visible = true;
                lbltransporter.Text    = dt.Rows[0]["Transporter"].ToString();
            }
            //DataSet ds = new DataSet();
            // ds = SpecimanDetails.GetSpecimenDatilsByEmpCode(Convert.ToString(DocNum), "documentno");

            DataTable dt1 = new DataTable();
            if (Session["tempDCData"] != null)
            {
                Session["tempDCData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempDCData"];
            }
            else
            {
                Session["tempDCData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempDCData"];
            }

            grdBookDetails.DataSource = dt1;
            grdBookDetails.DataBind();
            grdBookDetails.Columns[5].Visible = true;
            grdBookDetails.Columns[4].Visible = true;
            btn_Save.Visible = true;
            //DataTable dt3 = new DataTable();
            //dt3 = ds.Tables[0];
            //Session["tempDCData"] = dt3;
            grdBookDetails.Visible = true;
            //  btn_Save.Visible = false;
        }
        else
        {
            message("Record not found for document no. " + TxtDocNo.Text);
            ModalPopUpDocNum.Show();
            TxtDocNo.Text = "";
            TxtDocNo.Focus();
            btn_Save.Visible = false;
        }
    }