예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         ibox.msg = "";
         //********************************* Begin Knowledge dropdown ************
         ddlknowledge.Items.Add(new ListItem("- Select One -", "-1"));
         Scoreservice s  = new Scoreservice();
         DataSet      ds = s.getRatingScore();
         for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
         {
             string scoreval  = ds.Tables[0].Rows[i]["Score"].ToString();
             string scorename = ds.Tables[0].Rows[i]["point"].ToString();
             //Response.Write(dept);
             ddlknowledge.Items.Add(new ListItem(scorename, scoreval));
             ddlhelpful.Items.Add(new ListItem(scorename, scoreval));
             ddlcourteous.Items.Add(new ListItem(scorename, scoreval));
             ddlresponsesive.Items.Add(new ListItem(scorename, scoreval));
             ddltimeliness.Items.Add(new ListItem(scorename, scoreval));
             ddlease.Items.Add(new ListItem(scorename, scoreval));
             ddlclarify.Items.Add(new ListItem(scorename, scoreval));
             ddlcontent.Items.Add(new ListItem(scorename, scoreval));
             ddlaccess.Items.Add(new ListItem(scorename, scoreval));
             ddloverall.Items.Add(new ListItem(scorename, scoreval));
         }
     }
     catch (Exception ex)
     {
         ErrorLog err = new ErrorLog(ex);
     }
 }
예제 #2
0
    protected Rating doComputation(Rating rt)

    {
        Scoreservice sServe = new Scoreservice();

        double weight = rt.getWeight();

        SystemSetting st = getSetting();

        double peoplePower  = st.getPeople();
        double processPower = st.getProcess();
        double commPower    = st.getComm();

        double maxS = getMaxScore();    //maximum val

        double maxScore     = maxS * 3; // max value for a rating is 4  i.e excellent and
        double peopleTotal  = rt.getKnowledge() + rt.getHelpful() + rt.getCourteous();
        double processTotal = rt.getResponsive() + rt.getTimeliness() + rt.getEase();
        double commTotal    = rt.getClarity() + rt.getAccess() + rt.getContent();

        double peopleRatio  = peopleTotal / maxScore;
        double processRatio = processTotal / maxScore;
        double commRatio    = commTotal / maxScore;

        double percentagePeople = peopleRatio * weight * peoplePower;

        rt.setPercentPeople(percentagePeople);

        double percentageProcess = processRatio * weight * processPower;

        rt.setPercentProcess(percentageProcess);

        double percentageComm = commRatio * weight * commPower;

        rt.setPercentComm(percentageComm);

        double ratingPercentageScore = percentagePeople + percentageProcess + percentageComm;

        rt.setPercentageScore(ratingPercentageScore);

        //string print = "Know :" + rt.getKnowledge() + " hELPFUL:" + rt.getHelpful() + " Courteous: " + rt.getCourteous();
        //print =print+"Total in  People:  " + peopleTotal + "\n";
        //print = print + "Total in Proces:  " + processTotal + "\n";
        //print = print + "Total in COMM:  " + commTotal + "\n";

        //print = print + " People Ratio:  " + peopleRatio + "\n";
        //print = print + " Process Ratio:  " + processRatio + "\n";
        //print = print + " Comm Ratio:  " + commRatio + "\n";

        //print = print + " People Percentage:  " + percentagePeople + "\n";
        //print = print + " Process Percentage:  " + percentageProcess + "\n";
        //print = print + " Comm Percentage:  " + percentageComm + "\n";
        //new ErrorLog(print);

        return(rt);
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            string ratedDept = Session["ratingDept"].ToString().ToUpper();
            ibox.css = true;
            ibox.msg = "You are currently rating <b>" + ratedDept + "</b>" + " | <a href='javascript:history.go(-1)'>Go Back</a>";

            DropDownList1.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList2.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList3.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList4.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList5.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList6.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList7.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList8.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList9.Items.Add(new ListItem("- Select One -", "-1"));
            DropDownList12.Items.Add(new ListItem("- Select One -", "-1"));

            Scoreservice s  = new Scoreservice();
            DataSet      ds = s.getRatingScore();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string scoreval  = ds.Tables[0].Rows[i]["Score"].ToString();
                string scorename = ds.Tables[0].Rows[i]["point"].ToString();

                DropDownList1.Items.Add(new ListItem(scorename, scoreval));
                DropDownList2.Items.Add(new ListItem(scorename, scoreval));
                DropDownList3.Items.Add(new ListItem(scorename, scoreval));
                DropDownList4.Items.Add(new ListItem(scorename, scoreval));
                DropDownList5.Items.Add(new ListItem(scorename, scoreval));
                DropDownList6.Items.Add(new ListItem(scorename, scoreval));
                DropDownList7.Items.Add(new ListItem(scorename, scoreval));
                DropDownList8.Items.Add(new ListItem(scorename, scoreval));
                DropDownList9.Items.Add(new ListItem(scorename, scoreval));
                DropDownList12.Items.Add(new ListItem(scorename, scoreval));
            }
        }
    }