Example #1
0
    public void Dodisable(string caliberID)
    {
        editnum.Enable(true);
        bool flag = false;
        int  t    = common.IntSafeConvert(caliberID);

        flag = BG_CaliberLogic.IsLeafEnd(t);

        string message = "<b>无法在此处填写</b>";

        if (!flag)
        {
            if (!editnum.Enabled)
            {
            }
            else
            {
                editnum.Disable(true); X.Msg.Notify(new NotificationConfig()
                {
                    Title = "消息提示",
                    Html  = message,
                    Width = 250
                }).Show();
            }
        }
    }
Example #2
0
    private void GetGridData()
    {
        int deptid = DepID;
        int year   = common.IntSafeConvert(cmbyear.SelectedItem.Value);

        if (UserLimStr == "审核员")
        {
            List <Ext.Net.ListItem> listvalue = cmbdept.SelectedItems.ToList();
            List <int> listt = new List <int>();
            for (int i = 0; i < listvalue.Count; i++)
            {
                listt.Add(common.IntSafeConvert(listvalue[i].Value));
            }
            DataTable dt    = BG_CaliberLogic.GetAllBG_CaliberMon(listt, year);
            DataTable dtnew = GetNewDt(dt);
            this.BuildGridPanel(dtnew).AddTo(this.viewport1);
            this.viewport1.Remove("gridpl");
            editnum.Disable(true);
        }
        else
        {
            columndepname.Text = cmbdept.SelectedItem.Text;
            DataTable dt = BG_CaliberLogic.GetAllBG_CaliberMon(deptid, year);
            if (dt != null)
            {
                DataTable dtnew = GetNewDt(dt);
                Store1.DataSource = dtnew;
                Store1.DataBind();
            }
        }
    }