Ejemplo n.º 1
0
        public void bind(string strWhere)
        {
            List<ExtendModule.InstrumentAndConsumables> listinstrument = new
                List<ExtendModule.InstrumentAndConsumables>();
            ExtendBLL.InstrumentAndConsumables beconsum = new ExtendBLL.InstrumentAndConsumables();
            listinstrument = beconsum.GetExtendModelList(" Type = 'lowvalue' " + strWhere + " order by ID desc ");

            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetItemListByDClass("haocaileibie");
            foreach (ExtendModule.InstrumentAndConsumables i in listinstrument)
            {
                mLab = blab.GetModelList(" Lab_Code='" + i.StockLocation + "'");
                if (mLab.Count > 0)
                {
                    i.StockLocation = mLab[0].Lab_Name;
                }
                listCClass = eDictionary.GetModelList(" Code='" + i.Source + "' ");
                if (listCClass.Count > 0)
                {
                    i.Source = listCClass[0].Name;
                }
                listCClass = eDictionary.GetModelList(" Code='" + i.Arrow + "' ");
                if (listCClass.Count > 0)
                {
                    i.Arrow = listCClass[0].Name;
                }
            }

            gvInstrument.DataSource = listinstrument;
            gvInstrument.DataBind();
        }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            if (context.Request != null&&context.Request["Code"]!=null)
            {
                string strCode = context.Request["Code"].ToString();
                LabMS.BLL.InstrumentAndConsumables binstrument
                    = new LabMS.BLL.InstrumentAndConsumables();
                List<LabMS.Model.InstrumentAndConsumables> listInstrument
                    = new List<LabMS.Model.InstrumentAndConsumables>();
                ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
                List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();

                listInstrument = binstrument.GetModelList("Numbers = '" + strCode+"'");
                if (listInstrument.Count < 0)
                {
                    return;
                }

                listCClass = eDictionary.GetModelList("Code='" + listInstrument[0].Status + "'");
                if (listCClass.Count < 0)
                {
                    return;
                }

                context.Response.ContentType = "application/json";
                context.Response.Write("{result: '" +listCClass[0].Name+ "'}");

            }
        }
Ejemplo n.º 3
0
 //绑定学年
 protected void YearDDL_DataBind()
 {
     ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
     List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
     listCClass = eDictionary.GetModelList("DClass = 'ruxuenianfen' order by Code desc");
     YearDDL.DataSource = listCClass;
     YearDDL.DataTextField = "Name";
     YearDDL.DataValueField = "Code";
     YearDDL.DataBind();
 }
Ejemplo n.º 4
0
        public void bind(string strWhere)
        {
            List<ExtendModule.InstrumentAndConsumables> listevaluables = new
               List<InstrumentAndConsumables>();
            ExtendBLL.InstrumentAndConsumables bevaluables = new ExtendBLL.InstrumentAndConsumables();
            listevaluables = bevaluables.GetExtendModelList(" Type = 'guizhongyiqi' " + strWhere + " order by ID desc ");

            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetItemListByDClass("haocaileibie");
            foreach (ExtendModule.InstrumentAndConsumables i in listevaluables)
            {
                mLab = blab.GetModelList(" Lab_Code='" + i.StockLocation + "'");
                if (mLab.Count > 0)
                {
                    i.StockLocation = mLab[0].Lab_Name;
                }
                listCClass = eDictionary.GetModelList(" DClass='shebeilaiyuan' and Code='" + i.Source + "' ");
                if (listCClass.Count > 0)
                {
                    i.Source = listCClass[0].Name;
                }
                listCClass = eDictionary.GetModelList(" DClass='shiyongfangxiang' and Code='" + i.Arrow + "' ");
                if (listCClass.Count > 0)
                {
                    i.Arrow = listCClass[0].Name;
                }
                listCClass = eDictionary.GetModelList(" DClass='shebeizhuangtai' and Code='" + i.PresentSituation + "' ");
                if (listCClass.Count > 0)
                {
                    i.PresentSituation = listCClass[0].Name;
                }
            }

            GridViewValuables.DataSource = listevaluables;
            GridViewValuables.DataBind();
        }
        void bind(string strwhere)
        {
            LabMS.Model.SysSetting msys = new LabMS.Model.SysSetting();
            ExtendBLL.SysSetting extendsys = new ExtendBLL.SysSetting();
            msys = extendsys.GetCurrentSetting();

            List<LabMS.Model.OpentProject> listmopproject = new List<LabMS.Model.OpentProject>();
            LabMS.BLL.OpentProject bopproject = new LabMS.BLL.OpentProject();

            if (strwhere.Equals(""))
            {
                strwhere += " 1=1 ";
            }

            strwhere += " and  SYear = " + msys.CurrentYear + " and Semester = " + msys.CurrentSemester;

            if (UserType == "teacher")
            {
                strwhere += " and  OP_Teacher = '" + UserCode + "'";
            }

            listmopproject = bopproject.GetModelList(strwhere + " order by ID desc ");

            foreach (LabMS.Model.OpentProject op in listmopproject)
            {
                List<LabMS.Model.Teacher> listmteacher = new List<LabMS.Model.Teacher>();
                LabMS.BLL.Teacher bteacher = new LabMS.BLL.Teacher();
                listmteacher = bteacher.GetModelList(" Teacher_Code= '" + op.OP_Teacher + "'");
                if (listmteacher.Count > 0)
                {
                    op.OP_Teacher = listmteacher[0].Teacher_Name;
                }

                LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
                List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
                mLab = blab.GetModelList(" Lab_Code='"+ op.Project_Lab +"'");
                if (mLab.Count > 0)
                {
                    op.Project_Lab = mLab[0].Lab_Name;
                }
                ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
                List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
                listCClass = eDictionary.GetModelList("DClass = 'shiyanyaoqiu' and Code = '"+op.Project_Require+"'");
                if (listCClass.Count > 0)
                {
                    op.Project_Require = listCClass[0].Name;
                }
                op.OP_Phone = op.Project_StartWeek.ToString()+"--"+op.Project_EndWeek.ToString();
                List<LabMS.Model.ProjectAppointment>listprojectapp = new List<LabMS.Model.ProjectAppointment>();
                ExtendBLL.ProjectAppointment bprojectapp = new ExtendBLL.ProjectAppointment();
                listprojectapp = bprojectapp.GetModelList(" OP_ProjectCode ='"+op.OP_ProjectCode+"'");
                op.OP_OpenType = listprojectapp.Count.ToString();
                listCClass = eDictionary.GetModelList("DClass = 'shiyanleixing' and Code = '" + op.Project_Type + "'");
                if (listCClass.Count > 0)
                {
                    op.Project_Type = listCClass[0].Name;
                }
                if (op.OP_Audit == "0")
                {

                }
                op.OP_Audit = LabMS.Common.Status.GetOpenProjectStatus(op.OP_Audit);

            }

            gv_OpenProjectList.DataSource = listmopproject;
            gv_OpenProjectList.DataBind();
        }
Ejemplo n.º 6
0
        void bind(LabMS.Model.OpentProject mopproject)
        {
            tbOPContent.Text = mopproject.OP_OpenType;
            tbOPInCharge.Text = mopproject.OP_InCharge;
            tbOPPhone.Text = mopproject.OP_Phone;
            tbOPPlanningCourseTime.Text = mopproject.OP_PlanningCourseTime;
            tbOPProfessioanl.Text = mopproject.OP_Professioanl;
            tbOPReason.Text = mopproject.OP_AppIntro;
            tbProjectCode.Text = mopproject.OP_ProjectCode;
            tbProjectEndWeek.Text = mopproject.Project_EndWeek.Value.ToString();
            tbProjectName.Text = mopproject.OP_ProjectName;
            tbProjectStartWeek.Text = mopproject.Project_StartWeek.Value.ToString();

            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetModelList(" DClass='xueke' and Code ='" + mopproject.Project_Subject + "'");
            tbProjectSubjectCode.Value = mopproject.Project_Subject;
            if (listCClass.Count > 0)
            {
                tbProjectSubjectName.Value = listCClass[0].Name;
            }

            LabMS.BLL.Teacher bteacher = new LabMS.BLL.Teacher();
            List<Model.Teacher> listteacher = new List<LabMS.Model.Teacher>();
            listteacher = bteacher.GetModelList(" Teacher_Code ='" + mopproject.OP_Teacher + "'");
            tbTeacherCode.Value = mopproject.OP_Teacher;
            if (listteacher.Count > 0)
            {
                tbTeacherName.Value = listteacher[0].Teacher_Name;
            }

            tbTeacherCode.Value = mopproject.OP_Teacher;
            lbAppDate.Text = mopproject.OP_AppTime.Value.ToShortDateString();
            lbAppPerson.Text = mopproject.OP_Applicant;

            #region 绑定学生列表
            ExtendBLL.ProjectAppointment eprojectapp = new ExtendBLL.ProjectAppointment();
            List<LabMS.Model.Student> listStudent = new List<LabMS.Model.Student>();
            listStudent = eprojectapp.GetStudentByProject(mopproject.OP_ProjectCode);

            string strHTML = "<table  id='studenlist' border='1' class='infoTable' style='width: 400px; border-collapse: collapse;'>";
            strHTML += "<thead>";
            strHTML += "<tr class='header'>";
            strHTML += "<td class='none'>";
            strHTML += "ID";
            strHTML += "</td>";

            strHTML += "<td>";
            strHTML += "学号";
            strHTML += "</td>";

            strHTML += "<td>";
            strHTML += "姓名";
            strHTML += "</td>";
            strHTML += "<td>";
            strHTML += "";
            strHTML += "</td>";
            strHTML += "</tr>";
            strHTML += "</thead>";
            strHTML += "<tbody>";
            tb_StudentIDs.Value = "";
            foreach (LabMS.Model.Student s in listStudent)
            {
                if (tb_StudentIDs.Value == "")
                {
                    tb_StudentIDs.Value += s.ID.ToString();
                }
                else
                {
                    tb_StudentIDs.Value += "," + s.ID.ToString();
                }
                strHTML += "<tr>";
                strHTML += "<td class='none'>";
                strHTML += s.ID.ToString();
                strHTML += "</td>";
                strHTML += "<td>";
                strHTML += s.Student_Code;
                strHTML += "</td>";
                strHTML += "<td>";
                strHTML += s.Student_Name;
                strHTML += "</td>";
                strHTML += "<td>";
                strHTML += "<a>删除</a>";
                strHTML += "</td>";
                strHTML += "</tr>";
            }
            strHTML += "</tbody>";
            strHTML += "</table>";
            tblistStudents.Value = strHTML;
            tblistEmpty.Value = "0";
            #endregion
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 处理绑定数据
 /// </summary>
 /// <param name="ds"></param>
 /// <returns></returns>
 protected DataSet HandleDS(DataSet ds)
 {
     //构造: 性别Sex 班级名称ClassName 专业名称ProName 三列
     ds.Tables[0].Columns.Add("Sex");
     ds.Tables[0].Columns.Add("ClassName");
     ds.Tables[0].Columns.Add("ProName");
     ExtendBLL.Dictionary EDictionary = new ExtendBLL.Dictionary();
     ExtendBLL.Class EClass = new ExtendBLL.Class();
     for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
     {
         string Student_Sex = ds.Tables[0].Rows[i]["Student_Sex"].ToString();
         if (!string.IsNullOrEmpty(Student_Sex))
         {
             string str = "DClass='201' and Code='" + Student_Sex + "'";
             ds.Tables[0].Rows[i]["Sex"] = EDictionary.GetModelList(str)[0].Name.ToString();
         }
         if (!string.IsNullOrEmpty(ds.Tables[0].Rows[i]["ClassID"].ToString()))
         {
             int ClassID = int.Parse(ds.Tables[0].Rows[i]["ClassID"].ToString());
             ds.Tables[0].Rows[i]["ClassName"] = EClass.GetClassNameByClassID(ClassID);
         }
         if (!string.IsNullOrEmpty(ds.Tables[0].Rows[i]["Student_Pro"].ToString()))
         {
             int Student_Pro = int.Parse(ds.Tables[0].Rows[i]["Student_Pro"].ToString());
             ds.Tables[0].Rows[i]["ProName"] = EClass.ProessionalNameByID(Student_Pro);
         }
     }
     return ds;
 }
Ejemplo n.º 8
0
        void bind(LabMS.Model.OpentProject mopproject)
        {
            tbOPContent.Text = mopproject.OP_OpenType;
            tbOPInCharge.Text = mopproject.OP_InCharge;
            tbOPPhone.Text = mopproject.OP_Phone;
            tbOPPlanningCourseTime.Text = mopproject.OP_PlanningCourseTime;
            tbOPProfessioanl.Text = mopproject.OP_Professioanl;
            tbOPReason.Text = mopproject.OP_AppIntro;
            tbProjectCode.Text = mopproject.OP_ProjectCode;
            tbProjectEndWeek.Text = mopproject.Project_EndWeek.Value.ToString();
            tbProjectName.Text = mopproject.OP_ProjectName;
            tbProjectStartWeek.Text = mopproject.Project_StartWeek.Value.ToString();

            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetModelList(" DClass='xueke' and Code ='" + mopproject.Project_Subject + "'");
            if (listCClass.Count > 0)
            {
                tbProjectSubjectCode.Text = listCClass[0].Name;
            }

            LabMS.BLL.Teacher bteacher = new LabMS.BLL.Teacher();
            List<Model.Teacher> listteacher = new List<LabMS.Model.Teacher>();
            listteacher = bteacher.GetModelList(" Teacher_Code ='" + mopproject.OP_Teacher + "'");
            if (listteacher.Count > 0)
            {
                tbTeacherCode.Text = listteacher[0].Teacher_Name;
            }

            tbTeacherCode.Text = mopproject.OP_Teacher;
            lbAppDate.Text = mopproject.OP_AppTime.Value.ToShortDateString();
            lbAppPerson.Text = mopproject.OP_Applicant;
            lbOP_Approval.Text = mopproject.OP_Approval;
            string strSemester = Common.Status.GetSemester(mopproject.Semester.Value);
            lbSTime.Text = mopproject.SYear.Value.ToString() + "学年 " + strSemester;
            string strStatus = Common.Status.GetOpenProjectStatus(mopproject.OP_Audit);
            lbStatus.Text = strStatus;
            ExtendBLL.ProjectAppointment eprojectapp = new ExtendBLL.ProjectAppointment();
            List<LabMS.Model.Student> listStudent = new List<LabMS.Model.Student>();
            listStudent = eprojectapp.GetStudentByProject(mopproject.OP_ProjectCode);
            gv_studentList.DataSource = listStudent;
            gv_studentList.DataBind();
            if (mopproject.OP_Audit == "2" || mopproject.OP_Audit == "3")
            {
                panelExamine.Visible = true;
                lbAuditOpinion.Text = mopproject.AuditOpinion;
                lbCheckTime.Text = mopproject.CheckTime.Value.ToShortDateString();
            }
        }