예제 #1
0
        public void bind(string strCode, string strLocation, string strCondition)
        {
            LabMS.BLL.InstrumentAndConsumables bconsum = new LabMS.BLL.InstrumentAndConsumables();
            if (strCondition.Trim().Equals(""))
            {
                strCondition = "";
            }
            else
            {
                strCondition = " and " + strCondition;
            }
            string strWhere = " Type = '" + strCode + "'and SpaceLocation= '" + strLocation + "' and Quantity>0 " + strCondition + " order by ID desc ";
            if (strLocation.Equals("@ALL@"))
            {
                strWhere = " Type = '" + strCode + "'and  Quantity>0 " + strCondition + " order by ID desc ";
            }

            List<LabMS.Model.InstrumentAndConsumables> listmconsum = bconsum.GetModelList(strWhere);
            GridViewDic.DataSource = listmconsum;
            GridViewDic.DataBind();
        }
예제 #2
0
 public bool isNumbersLegal(string strNumbers, string strType)
 {
     LabMS.BLL.InstrumentAndConsumables bconsum = new LabMS.BLL.InstrumentAndConsumables();
     List<LabMS.Model.InstrumentAndConsumables> listmconsum
         = new List<LabMS.Model.InstrumentAndConsumables>();
     listmconsum = bconsum.GetModelList("Numbers='" + strNumbers + "' and Type='" + strType + "'");
     if (listmconsum.Count > 0)
     {
         return false;
     }
     return true;
 }