void 图号型号_m_OnCompleteSearch()
        {
            DataRow drTemp = this.图号型号.DataResult;

            if (drTemp != null)
            {
                customDataGridView1.CurrentRow.Cells["物品名称"].Value = drTemp["物品名称"];
                customDataGridView1.CurrentRow.Cells["规格"].Value   = drTemp["规格"];
                customDataGridView1.CurrentRow.Cells["物品ID"].Value = drTemp["序号"];
                customDataGridView1.CurrentRow.Cells["单位"].Value   = drTemp["单位"];

                ((DataGridViewTextBoxShowCell)customDataGridView1.CurrentRow.Cells["批次号"]).m_EndSql =
                    " and 物品ID = " + (int)drTemp["序号"];

                IBasicGoodsServer goodsService = SCM_Level01_ServerFactory.GetServerModule <IBasicGoodsServer>();

                F_GoodsAttributeRecord record = goodsService.GetGoodsAttirbuteRecord(Convert.ToInt32(drTemp["序号"]),
                                                                                     Convert.ToInt32(CE_GoodsAttributeName.来料须依据检验结果入库));

                if (record != null)
                {
                    customDataGridView1.CurrentRow.Cells["检验报告"].Value = Convert.ToBoolean(record.AttributeValue);
                }
            }
        }
Beispiel #2
0
        public List <View_Business_WarehouseInPut_RequisitionDetail> GetListViewDetail_OrderForm(string billNo, List <string> listOrderForm)
        {
            List <View_Business_WarehouseInPut_RequisitionDetail> listResult =
                new List <View_Business_WarehouseInPut_RequisitionDetail>();

            string orderFormNum = "";

            foreach (string item in listOrderForm)
            {
                orderFormNum += "'" + item + "',";
            }

            orderFormNum = orderFormNum.Substring(0, orderFormNum.Length - 1);

            string strSql = " select a.订单号, b.物品ID , b.图号型号, b.物品名称 ,b.规格, " +
                            " a.供货单位, b.订货数量, c.单位 from View_B_OrderFormInfo as a  " +
                            " inner join View_B_OrderFormGoods as b on a.订单号 = b.订单号 " +
                            " inner join View_F_GoodsPlanCost as c on b.物品ID = c.序号 where a.订单号 in (" + orderFormNum + ")";

            DataTable dtTemp = GlobalObject.DatabaseServer.QueryInfo(strSql);

            foreach (DataRow dr in dtTemp.Rows)
            {
                View_Business_WarehouseInPut_RequisitionDetail tempLnq =
                    new View_Business_WarehouseInPut_RequisitionDetail();

                tempLnq.单据号  = billNo;
                tempLnq.单位   = dr["单位"].ToString();
                tempLnq.供应商  = dr["供货单位"].ToString();
                tempLnq.关联业务 = dr["订单号"].ToString();
                tempLnq.物品ID = (int)dr["物品ID"];
                tempLnq.图号型号 = dr["图号型号"].ToString();
                tempLnq.物品名称 = dr["物品名称"].ToString();
                tempLnq.规格   = dr["规格"].ToString();
                tempLnq.数量   = (decimal)dr["订货数量"];

                IBasicGoodsServer goodsService = SCM_Level01_ServerFactory.GetServerModule <IBasicGoodsServer>();

                F_GoodsAttributeRecord record = goodsService.GetGoodsAttirbuteRecord(tempLnq.物品ID, Convert.ToInt32(CE_GoodsAttributeName.来料须依据检验结果入库));

                if (record != null)
                {
                    tempLnq.检验报告 = Convert.ToBoolean(record.AttributeValue);
                }

                listResult.Add(tempLnq);
            }


            return(listResult);
        }