protected void UploadButton_Click(object sender, EventArgs e)
        {
            UpdatePanel2.Update();
            if (FileUploadControl.HasFile)
            {
                UpdatePanel2.Update();
                System.Threading.Thread.Sleep(500);
                string imageStr = Convert.ToBase64String(FileUploadControl.FileBytes);

                try
                {
                    connectionNumber = Request.Cookies["compCode"].Value;
                    if (connectionNumber == "")
                    {
                        connectionNumber = txtNumbers.Text;
                    }
                }
                catch
                {
                    connectionNumber = txtNumbers.Text;
                }
                lblUploadStatus.Visible = false;
                tcp.sendData("image" + ";" + connectionNumber + ";" + phoneCode + ";" + imageStr);
                divUpload.Visible = true;
                divStatus.Visible = true;
                divCheck.Visible  = true;
            }
            else
            {
                divUpload.Visible    = true;
                divStatus.Visible    = true;
                lblUploadStatus.Text = "No Image Selected.";
            }
        }
 protected void btnCalcularPersonalizado_Click(object sender, EventArgs e)
 {
     if (txtmedidaDP.Text == "")
     {
         Utils.AddScriptClientUpdatePanel(panelCalcPersonalizado, "showSuccessMessage8()");
         return;
     }
     if (txtcantidadDP.Text == "")
     {
         Utils.AddScriptClientUpdatePanel(panelCalcPersonalizado, "showSuccessMessage9()");
         return;
     }
     if (ddlTipoMoldura.SelectedValue == "0")
     {
         Utils.AddScriptClientUpdatePanel(panelCalcPersonalizado, "showSuccessMessage11()");
         return;
     }
     if (ddlTipoMoldura.SelectedValue != "0")
     {
         double aprox;
         objDtoMoldura.FK_ITM_Tipo = int.Parse(ddlTipoMoldura.SelectedValue);
         aprox = objCtrMoldura.PrecioAprox(objDtoMoldura);
         int    cantp = int.Parse(txtcantidadDP.Text);
         double a     = aprox * cantp;
         txtpriceaprox.Text = Convert.ToString(a);
         if (aprox == 0)
         {
             txtpriceaprox.Text = "";
             ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "showNotification", "showNotification('bg-red', 'No hay Tipo de moldura seleccionado!', 'bottom', 'center', null, null);", true);
             return;
         }
         UpdatePanel2.Update();
     }
 }
Beispiel #3
0
 protected void AgregarUsuario(object sender, EventArgs e)
 {
     if (txtNombre.Text != "" && txtNick.Text != "")
     {
         usuario u = new usuario
         {
             nombre = txtNombre.Text,
             nick   = txtNick.Text
         };
         try
         {
             ent.usuario.Add(u);
             ent.SaveChanges();
             tablaUsuarios.DataSource = ent.usuario.ToList();
             tablaUsuarios.DataBind();
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "modalAddUsuario", "$('#modalAddUsuario').modal('hide');", true);
             UpdatePanel1.Update();
             lbTituloMensaje.Text = "Éxito al agregar Usuario";
             lbMensaje.Text       = "Usuario Agregado satisfactoriamente.";
             modalPupoExtenderMensaje.Show();
         }
         catch (Exception ex)
         {
             lbMensajeAddUsuario.Text = "Error al agregar usuario: " + ex.ToString().Substring(0, 300);
             UpdatePanel2.Update();
         }
     }
     else
     {
         lbMensajeAddUsuario.Text = "Ingrese todos los valores.";
         UpdatePanel2.Update();
     }
 }
Beispiel #4
0
    protected void Grid_Type_RowUpdating_Item(object sender, GridViewUpdateEventArgs e)
    {
        try
        {
            hRPItemInfo.HRPI_ItemID      = new Guid(GridView2.DataKeys[e.RowIndex].Value.ToString());
            hRPItemInfo.HRPI_Items       = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[1].Controls[0])).Text.Trim().ToString();
            hRPItemInfo.HRPI_Contents    = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[2].Controls[0])).Text.Trim().ToString();
            hRPItemInfo.HRPI_StanScore   = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[3].Controls[0])).Text.Trim().ToString();
            hRPItemInfo.HRPI_AssStandard = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[4].Controls[0])).Text.Trim().ToString();
            hRPItemInfo.HRPI_Remarks     = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[5].Controls[0])).Text.Trim().ToString();

            GridView2.EditIndex = -1;
            if (LblStateForGrid_Type.Text == "检索前")
            {
                BindItem("");
            }
            if (LblStateForGrid_Type.Text == "检索后")
            {
                BindItem(TxtItem1.Text.Trim());
            }
            UpdatePanel2.Update();
        }
        catch (Exception)
        {
            throw;
        }
    }
Beispiel #5
0
 protected void BtnCancelItem_Click(object sender, EventArgs e)
 {
     Panel3.Visible = false;
     UpdatePanel3.Update();
     Panel2.Visible = false;
     UpdatePanel2.Update();
 }
Beispiel #6
0
 //采购订单详细表
 protected void Gridview1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "ButtonChange")//修改
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex = row.RowIndex;
         labelMark.Text          = "修改";
         Label_MakeTime.Text     = e.CommandArgument.ToString();//详细表ID
         TextBox4.Text           = Gridview1.Rows[Gridview1.SelectedIndex].Cells[1].Text.ToString();
         TextBox9.Text           = Gridview1.Rows[Gridview1.SelectedIndex].Cells[2].Text.ToString();
         TextBox10.Text          = Gridview1.Rows[Gridview1.SelectedIndex].Cells[3].Text.ToString();
         TextBox8.Text           = Gridview1.Rows[Gridview1.SelectedIndex].Cells[5].Text.ToString();
         TextBox6.Text           = Gridview1.Rows[Gridview1.SelectedIndex].Cells[4].Text.ToString();
         TextBox11.Text          = Gridview1.Rows[Gridview1.SelectedIndex].Cells[6].Text.ToString();
         TextBox12.Text          = Gridview1.Rows[Gridview1.SelectedIndex].Cells[7].Text.ToString();
         label_MaterialID.Text   = Gridview1.DataKeys[Gridview1.SelectedIndex]["IMMBD_MaterialID"].ToString();
         label_IMUC_ID.Text      = Gridview1.DataKeys[Gridview1.SelectedIndex]["IMUC_ID"].ToString();
         Label6.Text             = label5.Text;
         Panel2.Visible          = true;
         UpdatePanel2.Update();
     }
     if (e.CommandName == "ButtonDelete")//删除
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex = row.RowIndex;
         PMPurchaseOrderinfo.PMPOD_PurchaseDetailID = new Guid(e.CommandArgument.ToString());
         pl.DeletePMPurchaseOrderDetail_Direct(PMPurchaseOrderinfo);
         PMPurchaseOrderinfo.PMPO_PurchaseOrderID = new Guid(labelPurchaseOrderID.Text);
         BindGridview1(PMPurchaseOrderinfo);
         Panel_PMPurchaseOrderDetail.Visible = true;
         UpdatePanel_PMPurchaseOrderDetail.Update();
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_PMPurchaseOrderDetail, GetType(), "aa", "alert('删除成功!')", true);
         return;
     }
 }
Beispiel #7
0
    public void ShowLabelMessage(string message, MessageType type)
    {
        Label messageLabel = UpdatePanel2.FindControl("LabelOpResultMessage") as Label;

        if (messageLabel != null)
        {
            messageLabel.Visible = true;
            messageLabel.Text    = message;

            string cssClass = CssConfig.MessageNormal;
            switch (type)
            {
            case MessageType.Success:
                cssClass = CssConfig.MessageSuccess;
                break;

            case MessageType.Failure:
                cssClass = CssConfig.MessageFailure;
                break;

            case MessageType.Attention:
                cssClass = CssConfig.MessageAttention;
                break;

            case MessageType.Normal:
                cssClass = CssConfig.MessageNormal;
                break;
            }
            messageLabel.CssClass = cssClass;
        }
    }
Beispiel #8
0
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

        GridView1.SelectedIndex = -1;
        if (-2 == e.NewPageIndex)
        {
            TextBox txtNewPageIndex = null;

            GridViewRow pagerRow = GridView1.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox");
            }

            if (null != txtNewPageIndex && txtNewPageIndex.Text != "")
            {
                newPageIndex = int.Parse(txtNewPageIndex.Text) - 1;
            }
        }
        else
        {
            newPageIndex = e.NewPageIndex;
        }
        newPageIndex        = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex        = newPageIndex >= GridView1.PageCount ? GridView1.PageCount - 1 : newPageIndex;
        GridView1.PageIndex = newPageIndex;
        databind2();
        Panel2.Visible = false;
        UpdatePanel2.Update();
        GridView1.SelectedIndex = -1;
    }
        private void Eliminar()
        {
            foreach (DataGridItem item in dtgLocalidadesCodigoPostal.Items)
            {
                CheckBox chk = (CheckBox)item.FindControl("chkEliminar");
                if (chk.Checked == true)
                {
                    ICodigoPostalRetiroCliente codigoPostalRetiro = CodigoPostalRetiroClienteFactory.GetCodigoPostalRetiroCliente();
                    codigoPostalRetiro.CodigoPostalRetiroClienteID = Utiles.Validaciones.obtieneEntero(item.Cells[0].Text);
                    codigoPostalRetiro.Eliminar(this.usuario);
                }
            }
            HGDataBind(false);
            LimpiarSeleccion();

            string script = "";

            script += "			alert('Los datos se guardaron correctamente.');\n";

            ScriptManager.RegisterClientScriptBlock(this.UpdatePanel2,
                                                    UpdatePanel2.GetType(),
                                                    "muestraMensajeEliminar",
                                                    script,
                                                    true);
            Consultar();
            ConsultarAsignadas();
        }
        /// <summary>
        /// Get the PredictedObserved Details based on the Predicted Observed Id, and then call
        /// BindCurrentAcceptedValues, passing the requrid details
        /// </summary>
        /// <param name="variable"></param>
        /// <param name="predictedObservedId"></param>
        private void BindCurrentAcceptedChartAndValues(bool updateChart)
        {
            string variable            = ddlVariables.SelectedItem.Text;
            int    predictedObservedId = int.Parse(Convert.ToString(hfPredictedObservedID.Value));

            PredictedObservedDetail currPODetails = PredictedObservedDS.GetByPredictedObservedID(predictedObservedId);

            POValuesList = BindCurrentAcceptedValuesssssss(variable, currPODetails);

            POValuesDT            = Genfuncs.ToDataTable(POValuesList);
            Session["POValuesDT"] = POValuesDT;

            gvPOValues.DataSource = POValuesDT;
            gvPOValues.PageSize   = Convert.ToInt32(ddlPageSize.SelectedValue);

            gvPOValues.DataBind();

            UpdatePanel2.Update();

            if (updateChart == true)
            {
                BindCurrentAcceptedChart(variable, POValuesList);
                UpdatePanel4.Update();
            }
        }
Beispiel #11
0
 protected void Button_c2_Click(object sender, EventArgs e)
 {
     Panel2.Visible = false;
     UpdatePanel2.Update();
     GridView1.SelectedIndex = -1;
     UpdatePanel1.Update();
 }
Beispiel #12
0
    protected void btnCC_Click(object sender, EventArgs e)
    {
        BLL_Infra_UserCredentials objUser = new BLL_Infra_UserCredentials();

        txtSelectedIDsCC.Text = "";
        string CC = "";

        foreach (ListItem li in lstUsers.Items)
        {
            if (li.Selected)
            {
                DataTable dt = objUser.Get_UserDetails(int.Parse(li.Value));
                if (dt.Rows.Count > 0)
                {
                    if (CC.Length > 0 && dt.Rows[0]["MailID"].ToString() != "")
                    {
                        CC += ";";
                    }
                    CC += dt.Rows[0]["MailID"].ToString();
                }
            }
        }
        txtMailCC.Text += ";" + CC;
        objUser         = null;
        //if (IsPostBack)
        //{
        //    ucEmailAttachment1.Register_JS_Attach();
        //}
        UpdatePanel2.Update();
    }
Beispiel #13
0
        protected void gridKpiPage_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                string pCodKpi = gridKpiPage.DataKeys[e.RowIndex].Value.ToString();

                cAptPagesKpi oAptPagesKpi = new cAptPagesKpi(ref oConn);
                oAptPagesKpi.CodCliente = CodCliente.Value;
                oAptPagesKpi.CodPage    = CodPage.Value;
                oAptPagesKpi.CodKpi     = pCodKpi;
                oAptPagesKpi.Accion     = "ELIMINAR";
                oAptPagesKpi.Put();

                if (!string.IsNullOrEmpty(oAptPagesKpi.Error))
                {
                    Response.Write(oAptPagesKpi.Error);
                    Response.End();
                }

                oConn.Close();
                LoadGrid();
                UpdatePanel2.Update();
            }
        }
Beispiel #14
0
    protected void Gridview_Apply_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        GridViewRow gvr = ((GridViewRow)(((LinkButton)(e.CommandSource)).Parent.Parent));

        if (e.CommandName == "Fenxi")
        {
            label18.Text   = Gridview_Apply.Rows[gvr.RowIndex].Cells[1].Text.ToString().Trim() + "-" + Gridview_Apply.Rows[gvr.RowIndex].Cells[2].Text.ToString().Trim();
            label19.Text   = e.CommandArgument.ToString();
            Panel1.Visible = true;
            UpdatePanel1.Update();
        }
        if (e.CommandName == "Shenhe")
        {
            label20.Text   = Gridview_Apply.Rows[gvr.RowIndex].Cells[1].Text.ToString().Trim() + "-" + Gridview_Apply.Rows[gvr.RowIndex].Cells[2].Text.ToString().Trim();
            label21.Text   = e.CommandArgument.ToString();
            Panel2.Visible = true;
            UpdatePanel2.Update();
        }
        if (e.CommandName == "Zhixing")
        {
            Guid id = new Guid(e.CommandArgument.ToString());
            or.Update_Apply_Zhixing(id);
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('执行成功,相应库存已扣除!')", true);
            BindApply();
        }
    }
Beispiel #15
0
 protected void BtncloseSearchEmployee_Click(object sender, EventArgs e)
 {
     Panel_SearchEmployee.Visible = false;
     Btnclose_Click(sender, e);
     UpdatePanel_SearchEmployee.Update();
     UpdatePanel2.Update();
 }
        private void limpiarFormulario()
        {
            TxMensaje.Text    = string.Empty;
            TxBusqueda.Text   = string.Empty;
            LbAprobacion.Text = string.Empty;

            LbIdEntrada.Text         = string.Empty;
            LbNombreEntrada.Text     = string.Empty;
            LbArticuloEntrada.Text   = string.Empty;
            LbSerieEntrada.Text      = string.Empty;
            LbInventarioEntrada.Text = string.Empty;
            LbFechaEntrada.Text      = string.Empty;
            DivEntradas.Visible      = false;

            TxNombre.Text             = string.Empty;
            DDLArticulo.SelectedIndex = -1;
            TxSerie.Text            = string.Empty;
            TxInventario.Text       = string.Empty;
            DDLMotivo.SelectedIndex = -1;
            TxObservaciones.Text    = string.Empty;
            //DDLAutorizado.SelectedIndex = -1;

            UpdatePanel3.Update();
            UpdatePanel1.Update();
            UpdatePanel2.Update();
            UpdatePanel6.Update();
        }
Beispiel #17
0
    //提交物料
    protected void Button_Com1(object sender, EventArgs e)
    {
        bool temp = false;

        foreach (GridViewRow item in Gridview5.Rows)
        {
            RadioButton rb = item.FindControl("RadioButtonMarkup") as RadioButton;
            if (rb.Checked)
            {
                TextBox4.Text         = Gridview5.Rows[item.RowIndex].Cells[1].Text.ToString();
                label_MaterialID.Text = Gridview5.DataKeys[item.RowIndex]["IMMBD_MaterialID"].ToString();
                TextBox8.Text         = Gridview5.Rows[item.RowIndex].Cells[4].Text.ToString();
                TextBox9.Text         = Gridview5.Rows[item.RowIndex].Cells[2].Text.ToString();
                label_IMUC_ID.Text    = Gridview5.DataKeys[item.RowIndex]["IMUC_ID"].ToString();
                temp = true;
            }
        }
        if (!temp)
        {
            ScriptManager.RegisterClientScriptBlock(UpdatePanel_Material, GetType(), "aa", "alert('请选择物料')", true);
            return;
        }
        else
        {
            UpdatePanel2.Update();
            Panel_Material.Visible = false;
            UpdatePanel_Material.Update();
        }
    }
Beispiel #18
0
        protected void btnDetalleDeuda_Click(object sender, EventArgs e)
        {
            try
            {
                Deuda deuda = new Deuda();

                string rut = txtRutDeudor.Text;

                deuda.IdMandante      = Convert.ToInt32(Session["IdMandante"]);
                deuda.IdEstadoDeuda   = 0;
                deuda.IdTipoDocumento = "0";
                deuda.RutDeudor       = rut;

                DataTable dt = new DataTable();
                dt = dal.getBuscarDeudaDetalle(deuda).Tables[0];
                grvDetalleDeuda.DataSource = dt;
                grvDetalleDeuda.DataBind();
                //if (string.IsNullOrEmpty(_lblObservacion.Text))
                //{
                //    lblObservacionTicket.Text = string.Empty;
                //}
                //else
                //{
                //    lblObservacionTicket.Text = _lblObservacion.Text;
                //}

                ScriptManager.RegisterStartupScript(UpdatePanel2, UpdatePanel2.GetType(), "show", "$(function () { $('#" + Panel1.ClientID + "').modal('show'); });", true);
                UpdatePanel2.Update();
            }
            catch (Exception ex)
            {
                divAlerta.Visible = true;
                lblInfo.Text      = ex.Message;
            }
        }
Beispiel #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Panel4.Visible       = false;
         Panel3.Visible       = false;
         Panel5.Visible       = false;
         Panel6.Visible       = false;
         Panel7.Visible       = false;
         Panel8.Visible       = false;
         Panel9.Visible       = false;
         Panel10.Visible      = false;
         GridView1.DataSource = pmc.Query_Copper();
         GridView1.DataBind();
         UpdatePanel2.Update();
         UpdatePanel3.Update();
         UpdatePanel4.Update();
         UpdatePanel5.Update();
         UpdatePanel6.Update();
         UpdatePanel7.Update();
         UpdatePanel8.Update();
         UpdatePanel9.Update();
         UpdatePanel10.Update();
     }
 }
        protected void btnconsulta_Click(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModalLabel", "$('#myModalConsulta').modal();", true);
            UpdatePanel2.Update();

            cargardatosusuario();
        }
Beispiel #21
0
    protected void Grid_Type_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        hRPtypeInfo.HRPAT_ID         = new Guid(Grid_Type.DataKeys[e.RowIndex].Value.ToString());
        hRPItemInfo.HRPI_ItemID      = new Guid(GridView2.DataKeys[e.RowIndex].Value.ToString());
        hRPtypeInfo.HRPAT_PType      = ((TextBox)(Grid_Type.Rows[e.RowIndex].Cells[1].Controls[0])).Text.Trim().ToString();
        hRPItemInfo.HRPI_Items       = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[1].Controls[0])).Text.Trim().ToString();
        hRPItemInfo.HRPI_StanScore   = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[2].Controls[0])).Text.Trim().ToString();
        hRPItemInfo.HRPI_AssStandard = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[3].Controls[0])).Text.Trim().ToString();
        hRPItemInfo.HRPI_Remarks     = ((TextBox)(GridView2.Rows[e.RowIndex].Cells[4].Controls[0])).Text.Trim().ToString();
        int i = hRPerfL.Update_HRPerformAssessType(hRPtypeInfo);

        if (i <= 0)
        {
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('重复的员工类型!')", true);
            return;
        }
        Grid_Type.EditIndex = -1;
        GridView2.EditIndex = -1;
        if (LblStateForGrid_Type.Text == "检索前")
        {
            BindGrid("");
            BindItem("");
        }
        if (LblStateForGrid_Type.Text == "检索后")
        {
            BindGrid(TxtType.Text.Trim());
            BindItem(TxtItem1.Text.Trim());
        }
        UpdatePanel_Grid.Update();
        UpdatePanel2.Update();
    }
Beispiel #22
0
 protected void BtncloseGrid_Detail_Click(object sender, EventArgs e)
 {
     Panel_SearchEmployee.Visible = false;
     UpdatePanel_SearchEmployee.Update();
     Panel2.Visible = false;
     UpdatePanel2.Update();
 }
Beispiel #23
0
    protected void BtnNew_Click(object sender, EventArgs e)
    {
        TxtAperson.Text       = "";
        TxtCperson.Text       = "";
        Panel_NewType.Visible = false;
        UpdatePanel_NewType.Update();
        Panel_SearchEmployee.Visible = false;
        Panel_Grid_Detail.Visible    = false;
        Panel_AddEmployee.Visible    = false;
        UpdatePanel_SearchEmployee.Update();
        UpdatePanel_Grid_Detail.Update();
        UpdatePanel_AddEmployee.Update();

        Panel_NewType.Visible = false;
        UpdatePanel_NewType.Update();
        Panel2.Visible = false;
        Panel3.Visible = false;
        Panel4.Visible = false;
        UpdatePanel2.Update();
        UpdatePanel3.Update();
        UpdatePanel4.Update();

        Panel_NewType.Visible = true;
        UpdatePanel_NewType.Update();
        TxtNewType.Text = "";
        Label28.Text    = "新增";
    }
Beispiel #24
0
    protected void complete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
    {
        string[] f1 = AsyncFileUpload1.PostedFile.ContentType.ToString().Split('/');
        int      q  = f1.Length;

        if (!HiddenField2.Value.ToString().Equals(""))
        {
            if (f1[q - 1].Equals("jpg") || f1[q - 1].Equals("jpeg"))
            {
                // MessageBox.Show(lblMessage.Text);
                //  lblMessage.Text = "File uploaded successfully";
                string[] f = AsyncFileUpload1.PostedFile.FileName.Split('.');
                int      i = f.Length;
                int      x = Convert.ToInt32(Application["image"]) + 1;
                Application["image"] = x;
                AsyncFileUpload1.SaveAs(Server.MapPath("~/temp/" + "image" + x.ToString() + "." + f[i - 1]));
                lblMessage.Text   = "File Uploaded Successfully";
                Image1.ImageUrl   = "~/temp/" + "image" + x.ToString() + "." + f[i - 1];
                btnUpload.Enabled = false;
                //  HiddenField1.Value = Image1.ImageUrl;

                UpdatePanel1.Update();
                UpdatePanel2.Update();
                Button2.Visible = true;
            }
        }
    }
Beispiel #25
0
    protected void Gridview_OnRowCommand(object sender, GridViewCommandEventArgs e)
    {
        string _commandName;

        if (e.CommandArgument.ToString() == "Next" || e.CommandArgument.ToString() == "Last" || e.CommandArgument.ToString() == "First" || e.CommandArgument.ToString() == "Prev")
        {
        }
        else
        {
            // Get the selected index and the command name
            int _selectedIndex = int.Parse(e.CommandArgument.ToString());

            _commandName = e.CommandName;
            if (_commandName == "spotshow")
            {
                for (int j = 0; j < grdSpotName.Rows.Count; j++)
                {
                    grdSpotName.Rows[j].BackColor = System.Drawing.Color.White;
                }
                grdSpotName.Rows[_selectedIndex].BackColor = System.Drawing.Color.LightGray;
                LinkButton spotid = (LinkButton)grdSpotName.Rows[_selectedIndex].Cells[1].FindControl("lblgrdSpotNameId");
                FetchGridDetails(spotid.Text);
                UpdatePanel2.Update();
                UpdatePanel3.Update();
            }
        }
    }
Beispiel #26
0
        private void showMessageModal(eMessage iPilih, string iTitle, string iMessage)
        {
            switch (iPilih)
            {
            case eMessage.eSuccess:
                iTitle = "SUCCESS. " + iTitle;
                break;

            case eMessage.eWarning:
                iTitle = "WARNING!!!. " + iTitle;
                break;

            case eMessage.eError:
                iTitle = "ERROR!!!. " + iTitle;
                break;
            }

            lblMessageModal_Title.Text = iTitle;
            lblMessageModal_Body.Text  = iMessage;

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script type='text/javascript'>");
            sb.Append("$('#messageModal').modal('show');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "messageModalScript", sb.ToString(), false);

            UpdatePanel2.Update();

            bRes = false;
        }
Beispiel #27
0
        protected void img_pdf_Click(object sender, ImageClickEventArgs e)
        {
            foreach (GridViewRow row in gv_files.Rows)
            {
                CheckBox chkRow = (row.Cells[3].FindControl("chk_select") as CheckBox);
                if (chkRow.Checked)
                {
                    if (row.RowType == DataControlRowType.DataRow)
                    {
                        if (row.Cells[8].Text == "INACTIVO")
                        {
                        }
                        else
                        {
                            string str_session = row.Cells[1].Text;
                            string str_video   = row.Cells[5].Text;

                            string d_pdf = "videos\\" + str_session + "\\ExtraFiles\\" + str_session + "_Report.pdf";
                            iframe_pdf.Visible           = true;
                            iframe_pdf.Attributes["src"] = d_pdf;
                            UpdatePanel2.Update();
                        }
                    }
                }
            }
        }
Beispiel #28
0
        //protected void btnCancel_Click(object sender, System.EventArgs e)
        //{
        //    Response.Redirect("PurchaseHome.aspx");
        //}



        protected void txtGivenAmt_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                //decimal a = Convert.ToDecimal(lblGrandTotal.Text) - Convert.ToDecimal(txtGivenAmt.Text);
                //txtBalanceAmt.Text = a.ToString();
                decimal a = Convert.ToDecimal(lblGrandTotal.Text);
                decimal b = Convert.ToDecimal(txtPaidAmt.Text);
                if (a < b)
                {
                    txtPaidAmt.Text    = lblGrandTotal.Text;
                    txtBalanceAmt.Text = "0";
                }

                else
                {
                    decimal c = Convert.ToDecimal(lblGrandTotal.Text) - Convert.ToDecimal(txtPaidAmt.Text);
                    txtBalanceAmt.Text = c.ToString();
                }
                UpdatePanel2.Update();
            }
            catch (Exception ex)
            {
                ErrorLog.saveerror(ex);
                //Do Logging
            }
        }
    private void BindGrid()
    {
        int countryid = -1, stateid = -1;

        if (ddlCountry.SelectedItem != null)
        {
            countryid = int.Parse(ddlCountry.SelectedValue);
        }
        if (ddlState.SelectedItem != null)
        {
            stateid = int.Parse(ddlState.SelectedValue);
        }

        DataSet ds = Resume.SearchResumes(txtSkills.Text, countryid, stateid, txtCity.Text);

        GridView1.DataSource = ds;
        GridView1.DataBind();

        if (GridView1.Rows.Count <= 0)
        {
            lblMsg.Text = "No records found!";
        }
        else
        {
            lblMsg.Text = "";
        }


        UpdatePanel2.Update();
    }
        protected void btnRemoveIngredient_Click(object sender, EventArgs e)
        {
            LinkButton btn = sender as LinkButton;

            if (btn != null)
            {
                DataListItem item = btn.Parent.Parent as DataListItem;

                List <SRL_Ingredient> list = Ingredients;
                if (item != null)
                {
                    list.RemoveAt(item.ItemIndex);
                }
                Ingredients = list;
            }

            dlistIngredients.DataSource = Ingredients.ToArray();
            dlistIngredients.DataBind();


            txtFoodName.Text = "";
            txtQuantity.Text = "";
            //ddlFractions.SelectedIndex = 0;
            ddlMeasurementUnits.SelectedIndex = 0;
            btnAddIngerdient.CommandArgument  = MyGlobalResources.Add;

            UpdatePanel2.Update();
            UpdatePanel3.Update();
            UpdatePanel4.Update();
        }