示例#1
0
        protected void rdoIsMater_Init(object sender, EventArgs e)
        {
            ASPxRadioButton radioBtn = sender as ASPxRadioButton;

            DevExpress.Web.ASPxGridView.GridViewDataItemTemplateContainer container = radioBtn.NamingContainer as
                                                                                      DevExpress.Web.ASPxGridView.GridViewDataItemTemplateContainer;
            Guid key = Guid.Parse((container).KeyValue.ToString());

            NAS.DAL.Nomenclature.Item.ItemUnitTypeConfig config = session.GetObjectByKey <NAS.DAL.Nomenclature.Item.ItemUnitTypeConfig>(key);

            string para = "master," + config.UnitTypeId.UnitTypeId.ToString();

            radioBtn.ClientInstanceName = String.Format("rdoIsMater_{0}", container.VisibleIndex);
            string code = "function(s, e){ ";

            for (int i = 0; i < grdUnitType.VisibleRowCount; i++)
            {
                if (container.VisibleIndex != i)
                {
                    code += String.Format("rdoIsMater_{0}.SetChecked(false); ", i);
                }
            }
            code += "if (s.GetChecked())" +
                    string.Format("grdUnitType.PerformCallback('{0}');", para + ",1") +
                    " else " +
                    string.Format("grdUnitType.PerformCallback('{0}');", para + ",0") + "}";

            radioBtn.ClientSideEvents.CheckedChanged = code;
        }
示例#2
0
        protected void hyperlinkDetail_Init(object sender, EventArgs e)
        {
            ASPxHyperLink link = sender as ASPxHyperLink;

            DevExpress.Web.ASPxGridView.GridViewDataItemTemplateContainer container = link.NamingContainer as
                                                                                      DevExpress.Web.ASPxGridView.GridViewDataItemTemplateContainer;
            Guid key = Guid.Parse((container).KeyValue.ToString());

            link.ClientSideEvents.Click = "function(s, e){ " +
                                          string.Format("popZoneTreelstProductUnits.PerformCallback('{0}'); ", key.ToString()) +
                                          "}";
        }
示例#3
0
        protected void ChkIsSelected_Init(object sender, EventArgs e)
        {
            ASPxCheckBox checkbox = sender as ASPxCheckBox;

            DevExpress.Web.ASPxGridView.GridViewDataItemTemplateContainer container = checkbox.NamingContainer as
                                                                                      DevExpress.Web.ASPxGridView.GridViewDataItemTemplateContainer;
            Guid key = Guid.Parse((container).KeyValue.ToString());

            string code = "function(s, e){ var params; " +
                          "if (s.GetChecked()) " +
                          string.Format("params = new Array('add', '{0}'); ", key.ToString()) +
                          "else " +
                          string.Format("params = new Array('delete', '{0}'); ", key.ToString()) +
                          "grdUnitType.PerformCallback(params); }";

            checkbox.ClientSideEvents.CheckedChanged = code;
        }
示例#4
0
    protected string TrataNome(DevExpress.Web.ASPxGridView.GridViewDataItemTemplateContainer Container)
    {
        if (Session["linhaExpandida"].ToString() != null || filtro != null)
        {
            int posicao;
            try
            {
                NomeUser = gridUsuario.GetRowValues(Convert.ToInt32(Session["linhaExpandida"].ToString()), "DSUsuario").ToString().Trim();
                if (NomeUser.IndexOf("'") > 0)
                {
                    posicao  = NomeUser.IndexOf("'");
                    NomeUser = NomeUser.Substring(0, posicao) + "1" + NomeUser.Substring(posicao + 1, (NomeUser.Length - (posicao + 1)));
                }
            }
            finally
            {
            }
        }

        //linhaExpandida = null;
        filtro = null;
        return(NomeUser);
    }