public string GetResultP50(string type, string num) { IList <TAB_YYSC_NUM> listcount = dal.GetList(t => t.TYPE == type && t.P50 == num, orders, isAscs); if (listcount.Count > 0) { if (listcount.Count == 1) { return(listcount[0].YUELING.ToString()); } else { int count = listcount.Count; string minStr = listcount[0].YUELING.ToString(); string maxStr = listcount[count - 1].YUELING.ToString(); return(minStr + "-" + maxStr); } } else { string sql = "exec sp_GetYueling_p50 @type, @num"; var prms = new SqlParameter[] { new SqlParameter("@type", type), new SqlParameter("@num", num), }; var list = BLLStatic.GetListBySql <int?>(sql, prms); var yueliiang = list[0]; var yueliiang2 = list[1]; if (yueliiang == null) { return("<" + yueliiang2); } else if (yueliiang2 == null) { return(">" + yueliiang); } else if (yueliiang == yueliiang2) { return(yueliiang.ToString()); } else if (yueliiang < yueliiang2) { return(yueliiang + "-" + yueliiang2); } else { return(yueliiang2 + "-" + yueliiang); } } }
public IList <yy_asd_tabNotMap> GetListByTime(string startdate, string enddate, string pz_lx) { string sql = " select a.*,b.childname,b.childgender,b.childbirthday,b.telephone " + " from YY_ASD_TAB a " + " left join yy_pz_tab pz on a.yy_xm = pz.pz_xm " + " left join tb_childbase b on a.child_id=b.id " + " where a.yy_rq>='" + startdate + "' and a.yy_rq>='" + startdate + "' and pz.pz_lx = '" + pz_lx + "'"; return(BLLStatic.GetListBySql <yy_asd_tabNotMap>(sql)); }
public IList <ys_ceping_tab> GetList(int cd_id) { var sql = "exec sp_GetCeping @cd_id"; var prms = new SqlParameter[] { new SqlParameter("@cd_id", cd_id), }; return(BLLStatic.GetListBySql <ys_ceping_tab>(sql, prms)); }
public bool IsFull(string yy_xm, string date, string time) { var sql = "exec sp_IsFull @pz_xm, @date, @time"; var prms = new SqlParameter[] { new SqlParameter("@pz_xm", yy_xm), new SqlParameter("@date", date), new SqlParameter("@time", time), }; return(BLLStatic.GetBySql <int>(sql, prms) > 0); }
private void RefreshRecordList() { IList <SqlParameter> prms = new List <SqlParameter>(); foreach (Control ct in panel2.Controls) { if (ct is TextBox || ct is ComboBox || ct is DateTimePicker) { prms.Add(new SqlParameter("@" + ct.Name, (ct.Text.Trim() + " " + ct.Tag?.ToString() ?? "").Trim())); } } string strSql = reportobj.REPORT_PROCEDURE; DataSet ds = BLLStatic.GetDataSet(strSql, CommandType.StoredProcedure, prms.ToArray()); dgvDiscourseList.DataSource = ds.Tables[0]; }