protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            try
            {
                int newindex = e.NewSelectedIndex;
                string invoice_id = GV_Result.Rows[newindex].Cells[1].Text;
                Session["Invoice_ID"] = invoice_id;
                Response.ContentType = "Application/pdf";
                Response.AppendHeader("Content-Disposition", "attachment; filename=" + Session["Invoice_ID"].ToString() + "/Invoice.pdf");


                Response.TransmitFile(Server.MapPath("~/Views/FIT/Invoices/" + Session["Invoice_ID"].ToString() + "/Invoice.pdf"));

                Response.End();

            }
            catch
            {

            }
            finally
            {

            }
        }
 protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     int newindex = e.NewSelectedIndex;
     string SightSeeingPriceListId = GV_SightSeeingPriceList.Rows[newindex].Cells[1].Text; /// Price list Primary key 
     int suppid = supplierid;
     Response.Redirect("~/Views/GITMaster/SightSeeingPriceListMaster.aspx?SightSeeingPriceListId=" + SightSeeingPriceListId + "&SUPPLIERID=" + suppid); //Price list Primary key         
 }
        protected void GridView1_SelectedIndexChanged2(object sender, GridViewSelectEventArgs e)
        {
            Session["schdid"] = grdview2.Rows[e.NewSelectedIndex].Cells[6].Text;

            //sqlquery = "	SELECT Schd.Schd_ID, Schd.SiteID, UN.Name, S.Sites, Schd.Status,Schd.VisitDate,"
            //+ "S.City_or_location,s.City,s.Site_Address,s.State "
            //+ "FROM Scheduling Schd JOIN UserNames UN "
            //+ "ON Schd.NameID = UN.NameID JOIN Sites s ON s.SiteID = Schd.SiteID WHERE Schd.Schd_ID ='" + grdview2.Rows[e.NewSelectedIndex].Cells[6].Text + "'";           
            //DataTable dt = DBHelper.GetDataTable(sqlquery);
           
            //for (int x = 0; x < dt.Rows.Count; x++)
            //{
            //    if (dt.Rows[x]["Schd_ID"].ToString() == grdview2.Rows[e.NewSelectedIndex].Cells[6].Text)
            //    {
            //        txtFname.Text = dt.Rows[x]["Name"].ToString();
            //        txtVistingDate.Text = DateTime.Parse(dt.Rows[x]["VisitDate"].ToString()).ToShortDateString();
            //        //txtSiteID.Text = dt.Rows[x]["SiteID"].ToString();
            //        txtSiteName.Text = dt.Rows[x]["Sites"].ToString();

            //        txtSiteAddress.Text = dt.Rows[x]["Site_Address"].ToString() + Environment.NewLine + dt.Rows[x]["City"].ToString()
            //            + ", " + dt.Rows[x]["State"].ToString();
            //    }
            //}
            //MultiView1.ActiveViewIndex = 2;
        }
 protected void gvMOnthlySOI_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     if (!string.IsNullOrEmpty(txtSearch.Text))
     {
         MonthlySOIManager.SearchMonthlySOI(SqlDataSourceMonthlySOI, txtSearch.Text);
     }
 }
Beispiel #5
0
 protected void GridView1_IndexChange(object sender, GridViewSelectEventArgs e)
 {
     string _prodID = GridView1.DataKeys[e.NewSelectedIndex].Value.ToString();
     int prodID = int.Parse(_prodID);
     CartList.getCart().set(prodID);
     Response.Redirect("Cart.aspx");
 }
 protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     int newindex = e.NewSelectedIndex;
     string TransferPriceListId = GV_TransferPackagePriceList.Rows[newindex].Cells[1].Text; /// Price list Primary key 
     int suppid = supplierid;
     Response.Redirect("~/Views/GITMaster/TransportPackgePriceListGIT.aspx?TransferPriceListId=" + TransferPriceListId + "&SUPPLIERID=" + suppid); //Price list Primary key         
 }
 protected void gvLDAPQueryResults_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     List<ADObject> proposedADObjects = (List<ADObject>)this.Session["proposedADObjects"];
     string sid = this.gvLDAPQueryResults.Rows[e.NewSelectedIndex].Cells[5].Text;
     foreach (ADObject ado in proposedADObjects)
     {
         if (ado.Sid == sid)
         {
             this.adoToResolve.Name = ado.Name;
             if (String.IsNullOrEmpty(ado.Name))
             {
                 this.adoToResolve.Name = sid;
             }
             this.adoToResolve.ClassName = ado.ClassName;
             this.adoToResolve.ADSPath = ado.ADSPath;
             this.adoToResolve.UPN = ado.UPN;
             this.adoToResolve.state = ADObjectState.Resolved;
             break;
         }
     }
     bool allResolved = true;
     foreach (ADObject ado in this.selectedAdObjects)
     {
         if (ado.state != ADObjectState.Resolved)
         {
             allResolved = false;
         }
     }
     this.callBackToTheOpener(allResolved);
     this.closeWindow(true);
 }
 protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     int newindex = e.NewSelectedIndex;
     string ID = GV_Result.Rows[newindex].Cells[1].Text;
     Response.Redirect("~/Views/AccountMaster/ChartofAccount.aspx?CAID=" + ID);
     
 }
 protected void ApprovedGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     int r = e.NewSelectedIndex;
     Label l = (Label)ApprovedGridView.Rows[r].FindControl("Label2");
     headerLabel.Text = "Application Details";
     approveLabel.Text = l.Text;
 }
 protected void gvPendingApprovals_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     gvPendingApprovals.SelectedIndex = Convert.ToInt32(e.NewSelectedIndex);
     Session["EvaluationId"] = Convert.ToInt32(gvPendingApprovals.SelectedDataKey.Values["Id"]);
     Session["UserId"] = gvPendingApprovals.SelectedDataKey.Values["UserId"];
     Response.Redirect("~/Employee/vPerformanceEvaluation.aspx");
 }
 protected void viewGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     int r = e.NewSelectedIndex;
     Label id = (Label)viewGridView.Rows[r].FindControl("Label8");
     remTextBox1.Text = aManagerBal.GetRemarks(id.Text);
     remarksMsgLabel.Visible = true;
     remTextBox1.Visible = true;
 }
        protected void appGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            //detailLabel.Visible = true;
            //int r = e.NewSelectedIndex;
            //Label l = (Label)AllAppGridView.Rows[r].FindControl("Label4");

            //detailLabel.Text = l.Text;
        }
Beispiel #13
0
        protected void grvMails_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            string accountId = Request.QueryString["AccountId"];
            string userId = Request.QueryString["UserId"];

            this.grvMails.SelectedIndex = e.NewSelectedIndex;
            Response.Redirect(string.Format("MessageDetail.aspx?UserId={0}&AccountId={1}&MessageId={2}", userId, accountId, (string)this.grvMails.SelectedDataKey.Value.ToString()));
        }
 protected void gvCustomers_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     if (!string.IsNullOrEmpty(txtSearchCustomer.Text))
     {
         DRManager.SeachCustomers(SqlDataSourceCustomers, txtSearchCustomer.Text);
     }
     btnBrowseCustomer_ModalPopupExtender.Show();
 }
 protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     int newindex = e.NewSelectedIndex;
     
     string quoteid = GV_Result.Rows[newindex].Cells[1].Text;
     string tourid = GV_Result.Rows[newindex].Cells[7].Text;
     
 }
Beispiel #16
0
        protected void grid_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            int i = e.NewSelectedIndex;
            GridViewRow row = grid.Rows[i];
            string artId = row.Cells[3].Text;

            Response.Redirect("~/Mantenimiento/Inciso.aspx?id=" + artId);
        }
        protected void GV_HotelPriceList_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {

            int newindex = e.NewSelectedIndex;

            string hotelpriceid = GV_HotelPriceList.Rows[newindex].Cells[7].Text;
            Response.Redirect("~/Views/GITMaster/HotelPriceListGIT.aspx?ID=" + hotelpriceid);
        }
 //protected void RejectGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 //{
 //    string detail = detailTextBox.Text;
 //    int r = e.NewSelectedIndex;
 //    Label l = (Label)RejectGridView.Rows[r].FindControl("Label1");
 //}
 protected void RejectGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     detailsLabel.Visible = true;
     int r = e.NewSelectedIndex;
     Label l = (Label)RejectGridView.Rows[r].FindControl("Label3");
     headerLabelLabel.Text = "Application Details";
     detailsLabel.Text = l.Text;
 }
        protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            //int newindex = e.NewSelectedIndex;

            //string voucherno = GV_Result.Rows[newindex].Cells[2].Text;

            //Response.Redirect("~/Views/Account/Vouchers.aspx?VN=" + voucherno);
        }
        protected void GV_HotelPriceList_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {

            int newindex = e.NewSelectedIndex;

            string sightPriceid = GV_sightPriceList.Rows[newindex].Cells[6].Text;
            Response.Redirect("SightSeeingPriceListGIT.aspx?ID=" + sightPriceid);
        }
        protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {

            int newindex = e.NewSelectedIndex;

            string invoice = GV_Result.Rows[newindex].Cells[3].Text;            
            Response.Redirect("~/Views/Account/TransferServiceVoucher.aspx?IN=" + invoice);
        }
 protected void grvCategory_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     int categoryID = Convert.ToInt32(grvCategory.DataKeys[e.NewSelectedIndex].Values["iCategoryID"]);
     btnOK.CommandName = "Edit";
     btnOK.CommandArgument = categoryID.ToString();
     napForm(categoryID);
     //
 }
Beispiel #23
0
 protected void gvShowTeacher_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     string gvProType = gvShowTeacher.Rows[e.NewSelectedIndex].Cells[1].Text;
     
     if (RowselectedProType != null)
         tea.Tch_FName=gvProType;
         RowselectedProType(this, gvProType);
         //RowselectedProType(this, gvProType);
 }
        protected void GV_InstrumentoSupervision_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            int OrderId = Convert.ToInt32(GV_InstrumentoSupervision.DataKeys[e.NewSelectedIndex].Value);

            InitializeEditPopUp();
            LoadEditData(OrderId);

            mpeEditInstrumentoSupervision.Show();
        }
        protected void GV_Proveedor_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            int OrderId = Convert.ToInt32(GV_Proveedor.DataKeys[e.NewSelectedIndex].Value);

            InitializeEditPopUp();
            LoadEditData(OrderId);

            mpeEditProveedor.Show();
        }
        protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            int newindex = e.NewSelectedIndex;

            string seqno = GV_Result.Rows[newindex].Cells[2].Text;
           
            Response.Redirect("~/Views/Account/Salary.aspx?IV=" + seqno);

        }
 protected void AnswerGV_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     if (AnswerGV.SelectedRow!=null)
     {
         CheckBox checkBox = AnswerGV.SelectedRow.Cells[3].Controls[0] as CheckBox;
         checkBox.Checked = false;
         AnswerGV.UpdateRow(AnswerGV.SelectedRow.RowIndex, true);
     }
 }
        protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            int newindex = e.NewSelectedIndex;

            string manual = GV_Result.Rows[newindex].Cells[1].Text;

            Response.Redirect("~/Views/FIT/ManualItinery.aspx?manual_itinery_id=" + manual);
            
        }
        protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {

            int newindex = e.NewSelectedIndex;

            string invoice = GV_Result.Rows[newindex].Cells[1].Text;
            string city = GV_Result.Rows[newindex].Cells[4].Text;
            Response.Redirect("~/Views/Account/SightSeeingVoucher.aspx?IN=" + invoice + "&CT=" + city);
        }
        protected void GV_Result_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {

            int newindex = e.NewSelectedIndex;
           
            string voucherid = GV_Result.Rows[newindex].Cells[1].Text;
            //string vouchertype = GV_Result.Rows[newindex].Cells[4].Text; 
            Response.Redirect("~/Views/Account/HotelServiceVoucher.aspx?IN=" + voucherid);
        }
        protected void dgvEtapas_SelectedIndexChanging(object sender, System.Web.UI.WebControls.GridViewSelectEventArgs e)
        {
            btnGuardar.Visible    = false;
            btnActualizar.Visible = true;

            GridViewRow row = dgvEtapas.Rows[e.NewSelectedIndex];

            idEtapaActual = Convert.ToInt32(row.Cells[0].Text);

            Etapa etapa = etapaNego.ObtenerEtapaSegunId(idEtapaActual);

            if (etapa.FechaInicio == null)
            {
                txtFechaInicioEtapa.Text = "";
            }
            else
            {
                txtFechaInicioEtapa.Text = Convert.ToDateTime(etapa.FechaInicio).ToShortDateString();
            };

            if (etapa.FechaFin == null)
            {
                txtFechaFinEtapa.Text = "";
            }
            else
            {
                txtFechaFinEtapa.Text = Convert.ToDateTime(etapa.FechaFin).ToShortDateString();
            };

            txtNombreEtapa.Text = etapa.Nombre;

            ddlTipoEstadoEtapa.Text = Convert.ToString(etapa.IdTipoEstadoEtapa);

            if (etapa.Informe.Value == true)
            {
                chkInformeEtapa.Checked = true;
            }
            else if (etapa.Informe.Value == false)
            {
                chkInformeEtapa.Checked = false;
            }

            if (etapa.Rendicion.Value == true)
            {
                chkRendicionEtapa.Checked = true;
            }
            else if (etapa.Rendicion.Value == false)
            {
                chkRendicionEtapa.Checked = false;
            }
        }
Beispiel #32
0
        protected void GridView1_SelectedIndexChanging(object sender, System.Web.UI.WebControls.GridViewSelectEventArgs e)
        {
            Session["id"] = this.GridView1.Rows[e.NewSelectedIndex].Cells[2].Text;
            GGFDataContext db = new GGFDataContext();
            var            xx = from x in db.GGFRequestMark
                                where x.id == Int32.Parse(this.GridView1.Rows[e.NewSelectedIndex].Cells[2].Text)
                                select x;

            foreach (var item in xx)
            {
                if (UserDDL.Items.Contains(UserDDL.Items.FindByText(item.修改人員)) == true)
                {
                    UserDDL.SelectedValue = UserDDL.Items.FindByText(item.修改人員).Value;
                    //UserDDL.SelectedItem.Text=item.
                    UserLB.Text = "";
                }
                else
                {
                    UserDDL.SelectedValue = "";
                    UserLB.Text           = "離職人員";
                }
                if (原因碼DDL.Items.Contains(原因碼DDL.Items.FindByValue(item.原因碼)) == true)
                {
                    原因碼DDL.SelectedValue = 原因碼DDL.Items.FindByValue(item.原因碼).Value;
                    resonLB.Text         = "";
                }
                else if (!string.IsNullOrEmpty(item.原因))
                {
                    原因碼DDL.SelectedValue = "";
                    resonLB.Text         = "原因碼以異動";
                }
                //SampleNbrLB.Text = item.sam_nbr;
                //打樣人員LB.Text = item.SampleUser;
                //TypeDDL.SelectedValue = TypeDDL.Items.FindByText(this.GridView1.Rows[e.NewSelectedIndex].Cells[3].Text).Value;
                TypeDDL.SelectedValue = TypeDDL.Items.FindByValue(item.處理類別).Value;
                //UserDDL.SelectedValue = UserDDL.Items.FindByText(this.GridView1.Rows[e.NewSelectedIndex].Cells[4].Text).Value;
                //UserDDL.SelectedValue = UserDDL.Items.FindByText(this.GridView1.Rows[e.NewSelectedIndex].Cells[4].Text).Value;
                //DateTB.Text = (this.GridView1.Rows[e.NewSelectedIndex].Cells[6].Text == "沒有資料") ? "" : this.GridView1.Rows[e.NewSelectedIndex].Cells[6].Text;
                DateTB.Text = item.處理時間;

                //件數TB.Text = (this.GridView1.Rows[e.NewSelectedIndex].Cells[7].Text == "沒有資料") ? "" : this.GridView1.Rows[e.NewSelectedIndex].Cells[7].Text;
                件數TB.Text = item.件數.ToString();
                //備註TB.Text = (this.GridView1.Rows[e.NewSelectedIndex].Cells[8].Text == "沒有資料") ? "" : this.GridView1.Rows[e.NewSelectedIndex].Cells[8].Text;
                備註TB.Text = item.備註;
            }

            UpDateBT.Visible = true;
            CancelBT.Visible = true;
            AddBT.Visible    = false;
        }
Beispiel #33
0
//INSTANT C# WARNING: Strict 'Handles' conversion only applies to 'WithEvents' fields declared in the same class - the event will be wired in 'SubscribeToEvents':
//ORIGINAL LINE: Protected Sub GridView1_SelectedIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs) Handles GridView1.SelectedIndexChanging
    protected void GridView1_SelectedIndexChanging(object sender, System.Web.UI.WebControls.GridViewSelectEventArgs e)
    {
        string id   = GridView1.DataKeys[e.NewSelectedIndex].Values[0].ToString();
        string Pass = "";

        DataLayer.SQLDataProvider data = new DataLayer.SQLDataProvider();
        Pass = data.ForgotPassword(id);

        Pass = System.Text.Encoding.Default.GetString(Convert.FromBase64String(Pass));

        try
        {
            using (System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(ConfigurationManager.AppSettings["AdminEmail"], GridView1.Rows[e.NewSelectedIndex].Cells[2].Text, "Your password for the Guestbook", "Your password is: " + Pass))
            {
                System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(ConfigurationManager.AppSettings["MailServer"]);
                smtp.Send(mail);
            }
        }
        catch (Exception ex)
        {
            DisplayError(ex.Message);
        }
    }
//INSTANT C# WARNING: Strict 'Handles' conversion only applies to 'WithEvents' fields declared in the same class - the event will be wired in 'SubscribeToEvents':
//ORIGINAL LINE: Protected Sub GridView1_SelectedIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs) Handles GridView1.SelectedIndexChanging
    protected void GridView1_SelectedIndexChanging(object sender, System.Web.UI.WebControls.GridViewSelectEventArgs e)
    {
        GridView1.PageIndex = e.NewSelectedIndex;
        LoadData();
    }
Beispiel #35
0
 protected void gvSample_SelectedIndexChanging(object sender, System.Web.UI.WebControls.GridViewSelectEventArgs e)
 {
 }
 protected virtual new void OnSelectedIndexChanging(GridViewSelectEventArgs e)
 {
 }