Beispiel #1
0
    [AjaxMethod]//win 显示
    public void JoemInfo(string action)
    {
        if (action == "Jnew")
        {
            Ext.DoScript("#{fpJoem}.getForm().reset();");
            hdnJoemid.SetValue("-1");
            nfScore.Disabled = false;
            taMEANS.Disabled = false;
        }
        if (action == "Nnew")
        {
            Ext.DoScript("#{fpJoem}.getForm().reset();");
            hdnJoemid.SetValue("-2");
            nfScore.Disabled = true;
            taMEANS.Disabled = true;
            taMEANS.Text     = "不达标扣10分,得分不得超过不达标标准分";
        }
        if (action == "Dnew")
        {
            Ext.DoScript("#{fpJoem}.getForm().reset();");
            hdnJoemid.SetValue("-3");
            nfScore.Disabled = true;
            taMEANS.Disabled = true;
            taMEANS.Text     = "降一级扣5分,得分不得超过下一级的最高分";
        }
        if (action == "edit")
        {
            RowSelectionModel sm = gpJoem.SelectionModel.Primary as RowSelectionModel;
            if (sm.SelectedRows.Count > 0)
            {
                hdnJoemid.SetValue(sm.SelectedRow.RecordID);
                switch (sm.SelectedRow.RecordID.Trim().Substring(0, 1))
                {
                case "j":
                    var joem = dc.SqsJeomcriterion.First(p => p.Jcid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                    tfJccontent.Text = joem.Jccontent;
                    nfScore.Text     = joem.Score.ToString();
                    taMEANS.Text     = joem.Means;
                    break;

                case "n":
                    var ec = dc.SqsEssentialcondition.First(p => p.Ecid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                    tfJccontent.Text = ec.Content;
                    nfScore.Disabled = true;
                    taMEANS.Disabled = true;
                    taMEANS.Text     = "不达标扣10分,得分不得超过不达标标准分";
                    break;

                case "d":
                    var de = dc.SqsDemotion.First(p => p.Deid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                    tfJccontent.Text = de.Content;
                    nfScore.Disabled = true;
                    taMEANS.Disabled = true;
                    taMEANS.Text     = "降一级扣5分,得分不得超过下一级的最高分";
                    break;
                }
            }
        }
        JoemWindow.Show();
    }
Beispiel #2
0
 [AjaxMethod]//win 显示
 public void JoemInfo(string action)
 {
     if (action == "new")
     {
         Ext.DoScript("#{fpJoem}.getForm().reset();");
         hdnJoemid.SetValue("-1");
     }
     if (action == "addnew")
     {
         Ext.DoScript("#{fpJoem}.getForm().reset();");
         hdnJoemid.SetValue("-2");
     }
     if (action == "edit")
     {
         RowSelectionModel sm = gpJoem.SelectionModel.Primary as RowSelectionModel;
         if (sm.SelectedRows.Count > 0)
         {
             hdnJoemid.SetValue(sm.SelectedRow.RecordID);
             if (sm.SelectedRow.RecordID.Trim().Substring(0, 1) == "j")
             {
                 var joem = dc.ParJeomcriterion.First(p => p.Jcid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                 tfJccontent.Text    = joem.Jccontent;
                 nfJoemMinscore.Text = joem.Minscore.ToString();
                 nfJoemMaxscore.Text = joem.Maxscore.ToString();
             }
             else
             {
                 var joem = dc.ParAddjeomcriterion.First(p => p.Ajcid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                 tfJccontent.Text    = joem.Ajccontent;
                 nfJoemMinscore.Text = joem.Minscore.ToString();
                 nfJoemMaxscore.Text = joem.Maxscore.ToString();
             }
         }
     }
     JoemWindow.Show();
 }