Ejemplo n.º 1
0
        protected void btnDetallePagos_Click(object sender, EventArgs e)
        {
            try
            {
                string rut = lblRutDeudor.Text;

                string idMandante = Session["IdMandante"].ToString();
                LinkButton btn = (LinkButton)sender;
                GridViewRow row = (GridViewRow)btn.NamingContainer;

                Label _lblIdSucursal = (Label)grvPagos.Rows[row.RowIndex].FindControl("lblIdSucursal");
                
                DataTable dt = new DataTable();
                dt = dal.getBuscarDetallePagoRut(_lblIdSucursal.Text, null, 0, null, null, rut).Tables[0];
                Session["sessionDetallePagoExcel"] = dt;
                grvDetallePagos.DataSource = dt;
                grvDetallePagos.DataBind();
                grvDetallePagos.HeaderRow.TableSection = TableRowSection.TableHeader;
                
                ScriptManager.RegisterStartupScript(UpdatePanel12, UpdatePanel12.GetType(), "show", "$(function () { $('#" + Panel11.ClientID + "').modal('show'); });", true);
                UpdatePanel12.Update();
            }
            catch (Exception ex)
            {
                divAlerta.Visible = true;
                lblInfo.Text = ex.Message;
            }
        }
Ejemplo n.º 2
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     if (RadioButtonList2.SelectedIndex < 0)
     {
         errorDiv2.InnerText = "Please select an answer";
     }
     else if (RadioButtonList2.SelectedIndex == 3)
     {
         score++;
         questionsAnswered++;
         Button3.Enabled = false;
         RadioButtonList2.Items.FindByValue("correct").Attributes.Add("class", "right");
         anchor.Visible = true;
         anchorA.Text   = "Well done! Another easy one. We've all seen Anchorman, it's just full of memorable quotes";
         UpdatePanel5.Update();
         UpdatePanel6.Update();
         UpdatePanel12.Update();
     }
     else
     {
         questionsAnswered++;
         Button3.Enabled = false;
         RadioButtonList2.SelectedItem.Attributes.Add("class", "wrong");
         RadioButtonList2.Items.FindByValue("correct").Attributes.Add("class", "right");
         anchor.Visible = true;
         anchorA.Text   = "Wow.. I thought everyone would get this one, It's Will Ferral as Ron Burgundy in this comedy gem";
         UpdatePanel5.Update();
         UpdatePanel6.Update();
         UpdatePanel12.Update();
     }
 }
Ejemplo n.º 3
0
 // Event function
 protected void btnSemster2RightShift_Click(object sender, EventArgs e)
 {
     LBLerror.Text     = "";
     Label1.Text       = "";
     lblErrorMian.Text = "";
     RemSem2ModRec();
     UpdatePanel2.Update();
     UpdatePanel3.Update();
     UpdatePanel12.Update();
     UpdatePanel11.Update();
 }
Ejemplo n.º 4
0
 // Event function
 protected void btnSemster1LeftShift_Click(object sender, EventArgs e)
 {
     LBLerror.Text     = "";
     Label1.Text       = "";
     lblErrorMian.Text = "";
     RemSem1ModNonRec();
     UpdatePanel1.Update();
     UpdatePanel4.Update();
     UpdatePanel12.Update();
     UpdatePanel11.Update();
 }
Ejemplo n.º 5
0
        protected void btnDetallePagosTotal_Click(object sender, EventArgs e)
        {
            try
            {
                string rut = lblRutDeudor.Text;

                DataTable dt = new DataTable();
                dt = dal.getBuscarDetallePagoRut(null, null, 0, null, null, rut).Tables[0];
                grvDetallePagos.DataSource = dt;
                grvDetallePagos.DataBind();
                grvDetallePagos.HeaderRow.TableSection = TableRowSection.TableHeader;

                ScriptManager.RegisterStartupScript(UpdatePanel12, UpdatePanel12.GetType(), "show", "$(function () { $('#" + Panel11.ClientID + "').modal('show'); });", true);
                UpdatePanel12.Update();
            }
            catch (Exception ex)
            {
                divAlerta.Visible = true;
                lblInfo.Text = ex.Message;
            }
        }
Ejemplo n.º 6
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();
        }
    }
Ejemplo n.º 7
0
 protected void CloseWorkOrderView_Click(object sender, EventArgs e)
 {
     Panel12.Visible = false;
     UpdatePanel12.Update();
 }