示例#1
0
    public virtual string BCList(string oqc_id)
    {
        StringBuilder sb = new StringBuilder();

        using (SqlConnection conn = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["EIPBConnectionString"].ConnectionString))
        {
            string sqlss = "SELECT * " +
                           " FROM EIPE.dbo.OQC_bodyBARCODE " +
                           " WHERE headrowno = '" + oqc_id + "'   ";

            conn.Open();
            SqlCommand    cmd = new SqlCommand(sqlss, conn);
            SqlDataReader rd  = cmd.ExecuteReader();

            int i = 0;
            while (rd.Read())
            {
                i++;
                BCode item = new BCode();

                item.BARCODE_barcode = rd["BARCODE_barcode"].ToString().Trim();
                item.BARCODE_Model   = rd["BARCODE_Model"].ToString().Trim();
                item.BARCODE_Product = rd["BARCODE_Product"].ToString().Trim();
                item.BARCODE_th      = rd["BARCODE_th"].ToString().Trim();
                item.headrowno       = rd["headrowno"].ToString().Trim();
                item.rowno           = rd["rowno"].ToString().Trim();

                item.Param  = rd["Parameters"].ToString().Trim();
                item.Grade  = rd["grade"].ToString().Trim();
                item.Remark = rd["remark"].ToString().Trim();

                string param   = string.IsNullOrEmpty(item.Param) ? " " : item.Param;
                string grade   = string.IsNullOrEmpty(item.Grade) ? " " : item.Grade;
                string remark  = string.IsNullOrEmpty(item.Remark) ? " " : item.Remark;
                string barcode = item.BARCODE_barcode.Replace(";", "<br>");


                sb.Append("<tr id=\"bcode_row_" + i + "\" align=\"center\" style=\"background-color: #f3f1ee\">");
                sb.Append("<td style=\"width: 60px\"><p id=\"bcode_sn_" + i + "\" class=\"bcode_item Bcode\">" + i + "</p></td>");
                sb.Append("<td style=\"width: 150px\"><select name=\"bcode_model\" id=\"bcode_model_" + i + "\" class=\"ML Bcode\"><option value=\"\">Select</option>" + getModel(item.BARCODE_Model) + "</select></td>");
                sb.Append("<td style=\"width: 150px\"><select name=\"bcode_prod\" id=\"bcode_prod_" + i + "\" class=\"ML Bcode\"><option value=\"\">Select</option>" + getProd(item.BARCODE_Product) + "</select></td>");
                sb.Append("<td style=\"width: 150px\"><input type=\"text\" value=\"" + item.BARCODE_th + "\" id=\"bcode_th_" + i + "\" name=\"bcode_th\" cssclass=\"Bcode number\" /></td>");
                sb.Append("<td style=\"width: 150px\">");
                sb.Append("<img src='img/add.png' height='20' width='20' onclick='input_BARCODE(this)' id='bcode_img_" + i + "' class='Bcode' />");
                sb.Append("<input name=\"bcode_record\" id=\"bcode_record_" + i + "\" type=\"hidden\" value=\"" + item.BARCODE_barcode + "\" class=\"Bcode\" />");
                sb.Append("<div name=\"bcode_show\" id=\"bcode_show_" + i + "\" class=\"Bcode\" style=\"text-align: left\">" + barcode + "</div></td >");
                sb.Append("<td style=\"width: 150px\">" + ddl_grade(i, grade) + "</td>");
                sb.Append("<td><input type=\"text\" value=\"" + param + "\" id=\"txt_param_" + i + "\" name=\"txt_param\" cssclass=\"Bcode number\" />%</td>");
                sb.Append("<td><input type=\"text\" value=\"" + remark + "\" id=\"txt_remark_" + i + "\" name=\"txt_remark\" cssclass=\"Bcode number\" /></td>");


                sb.Append("<td style=\"width: 100px\"><input type=\"button\"  bcode_sn=\"" + i + "\"  value=\"DEL\"  onclick=\"bcode_row_del(" + i + ")\" style=\"height: 22; background: #C8C8C8; font-size: 12px; font-weight: bold; border: solid 1px #000000\" /></td></tr>");
            }



            conn.Close();
        }
        return(sb.ToString());
    }
示例#2
0
 public int Amount(Employee employee, IEnumerable <Dependent> dependents, BCode code)
 {
     return(_benefits.FirstOrDefault(b => b.BenefitType == code)?
            .Amount(employee, dependents) ?? throw new ArgumentNullException(nameof(BCode)));
 }
示例#3
0
 public APercentBenefit()
 {
     BenefitType = BCode.A_Name;
 }
示例#4
0
 public YearlyBenefit()
 {
     BenefitType = BCode.PerYear;
 }