Esempio n. 1
0
        private void LoadData()
        {
            //绑定几个下拉列表值
            btnClose.OnClientClick = ActiveWindow.GetHideReference();
            DataSet dsReq = m_bllpms_Customer_Require.GetList("");
            DataSet dsStr = m_bllpms_Product_Struc.GetList("");
            DataSet dsMet = m_bllpms_Product_Mater.GetList("");
            DataSet dsInd = m_bllpms_Product_Indust.GetList("");
            DataSet dsTyp = m_bllpms_Product_Type.GetList("");

            ddlReq.DataValueField = "CustomerRequireID";
            ddlReq.DataTextField  = "CustomerRequire";
            ddlReq.DataSource     = dsReq.Tables[0];
            ddlReq.DataBind();

            ddlStr.DataValueField = "ProductStrucID";
            ddlStr.DataTextField  = "ProductStruc";
            ddlStr.DataSource     = dsStr.Tables[0];
            ddlStr.DataBind();

            ddlMet.DataValueField = "ProductMaterID";
            ddlMet.DataTextField  = "ProductMater";
            ddlMet.DataSource     = dsMet.Tables[0];
            ddlMet.DataBind();

            ddlInd.DataValueField = "ProductIndustID";
            ddlInd.DataTextField  = "ProductIndust";
            ddlInd.DataSource     = dsInd.Tables[0];
            ddlInd.DataBind();

            int id = GetQueryIntValue("id");

            TSM.Model.pms_Product_Info modelpms_Product_Info = m_bllpms_Product_Info.GetModel(id);

            if (modelpms_Product_Info == null)
            {
                // 参数错误,首先弹出Alert对话框然后关闭弹出窗口
                Alert.Show("参数错误!", String.Empty, ActiveWindow.GetHideReference());
                return;
            }

            //给控件赋初值,显示
            lbBatchID.Text       = modelpms_Product_Info.ProductBatchID.ToString().Trim();
            tbxProName.Text      = modelpms_Product_Info.ProductInfoName.ToString().Trim();
            ddlStr.SelectedValue = modelpms_Product_Info.ProductStrucID.ToString().Trim();
            ddlMet.SelectedValue = modelpms_Product_Info.ProductMaterID.ToString().Trim();
            ddlReq.SelectedValue = modelpms_Product_Info.CustomerRequireID.ToString().Trim();
            ddlInd.SelectedValue = modelpms_Product_Info.ProductIndustID.ToString().Trim();
            tbxPic.Text          = modelpms_Product_Info.ProductPhotoNum.ToString().Trim();
            tbxSta.Text          = modelpms_Product_Info.ProductStandard.ToString().Trim();
            tbxWei.Text          = modelpms_Product_Info.ProductWeight.ToString().Trim();
            tbxOrd.Text          = modelpms_Product_Info.OrderQuantity.ToString().Trim();
            tbxRem.Text          = modelpms_Product_Info.Remarks.ToString().Trim();
        }
Esempio n. 2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(TSM.Model.pms_Product_Info model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update pms_Product_Info set ");
            strSql.Append("ProductBatchID=@ProductBatchID,");
            strSql.Append("CustomerRequireID=@CustomerRequireID,");
            strSql.Append("ProductTypeID=@ProductTypeID,");
            strSql.Append("ProductStrucID=@ProductStrucID,");
            strSql.Append("ProductMaterID=@ProductMaterID,");
            strSql.Append("ProductIndustID=@ProductIndustID,");
            strSql.Append("ProductInfoName=@ProductInfoName,");
            strSql.Append("ProductPhotoNum=@ProductPhotoNum,");
            strSql.Append("ProductStandard=@ProductStandard,");
            strSql.Append("ProductWeight=@ProductWeight,");
            strSql.Append("OrderQuantity=@OrderQuantity,");
            strSql.Append("ContourSize=@ContourSize,");
            strSql.Append("Remarks=@Remarks");
            strSql.Append(" where ProductInfoID=@ProductInfoID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ProductInfoID",     SqlDbType.Int,       4),
                new SqlParameter("@ProductBatchID",    SqlDbType.Int,       4),
                new SqlParameter("@CustomerRequireID", SqlDbType.Int,       4),
                new SqlParameter("@ProductTypeID",     SqlDbType.Int,       4),
                new SqlParameter("@ProductStrucID",    SqlDbType.Int,       4),
                new SqlParameter("@ProductMaterID",    SqlDbType.Int,       4),
                new SqlParameter("@ProductIndustID",   SqlDbType.Int,       4),
                new SqlParameter("@ProductInfoName",   SqlDbType.VarChar,  64),
                new SqlParameter("@ProductPhotoNum",   SqlDbType.VarChar,  64),
                new SqlParameter("@ProductStandard",   SqlDbType.VarChar,  64),
                new SqlParameter("@ProductWeight",     SqlDbType.Decimal,   9),
                new SqlParameter("@OrderQuantity",     SqlDbType.VarChar,  64),
                new SqlParameter("@ContourSize",       SqlDbType.VarChar, 144),
                new SqlParameter("@Remarks",           SqlDbType.Text)
            };
            parameters[0].Value  = model.ProductInfoID;
            parameters[1].Value  = model.ProductBatchID;
            parameters[2].Value  = model.CustomerRequireID;
            parameters[3].Value  = model.ProductTypeID;
            parameters[4].Value  = model.ProductStrucID;
            parameters[5].Value  = model.ProductMaterID;
            parameters[6].Value  = model.ProductIndustID;
            parameters[7].Value  = model.ProductInfoName;
            parameters[8].Value  = model.ProductPhotoNum;
            parameters[9].Value  = model.ProductStandard;
            parameters[10].Value = model.ProductWeight;
            parameters[11].Value = model.OrderQuantity;
            parameters[12].Value = model.ContourSize;
            parameters[13].Value = model.Remarks;

            DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
Esempio n. 3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(TSM.Model.pms_Product_Info model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into pms_Product_Info(");
            strSql.Append("ProductBatchID,CustomerRequireID,ProductTypeID,ProductStrucID,ProductMaterID,ProductIndustID,ProductInfoName,ProductPhotoNum,ProductStandard,ProductWeight,OrderQuantity,ContourSize,Remarks)");
            strSql.Append(" values (");
            strSql.Append("@ProductBatchID,@CustomerRequireID,@ProductTypeID,@ProductStrucID,@ProductMaterID,@ProductIndustID,@ProductInfoName,@ProductPhotoNum,@ProductStandard,@ProductWeight,@OrderQuantity,@ContourSize,@Remarks)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ProductBatchID",    SqlDbType.Int,       4),
                new SqlParameter("@CustomerRequireID", SqlDbType.Int,       4),
                new SqlParameter("@ProductTypeID",     SqlDbType.Int,       4),
                new SqlParameter("@ProductStrucID",    SqlDbType.Int,       4),
                new SqlParameter("@ProductMaterID",    SqlDbType.Int,       4),
                new SqlParameter("@ProductIndustID",   SqlDbType.Int,       4),
                new SqlParameter("@ProductInfoName",   SqlDbType.VarChar,  64),
                new SqlParameter("@ProductPhotoNum",   SqlDbType.VarChar,  64),
                new SqlParameter("@ProductStandard",   SqlDbType.VarChar,  64),
                new SqlParameter("@ProductWeight",     SqlDbType.Decimal,   9),
                new SqlParameter("@OrderQuantity",     SqlDbType.VarChar,  64),
                new SqlParameter("@ContourSize",       SqlDbType.VarChar, 144),
                new SqlParameter("@Remarks",           SqlDbType.Text)
            };
            parameters[0].Value  = model.ProductBatchID;
            parameters[1].Value  = model.CustomerRequireID;
            parameters[2].Value  = model.ProductTypeID;
            parameters[3].Value  = model.ProductStrucID;
            parameters[4].Value  = model.ProductMaterID;
            parameters[5].Value  = model.ProductIndustID;
            parameters[6].Value  = model.ProductInfoName;
            parameters[7].Value  = model.ProductPhotoNum;
            parameters[8].Value  = model.ProductStandard;
            parameters[9].Value  = model.ProductWeight;
            parameters[10].Value = model.OrderQuantity;
            parameters[11].Value = model.ContourSize;
            parameters[12].Value = model.Remarks;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(1);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
Esempio n. 4
0
        private void SaveProductType()
        {
            TSM.Model.pms_Product_Info modelpms_Product_Info = new TSM.Model.pms_Product_Info();
            modelpms_Product_Info.ProductBatchID    = GetQueryIntValue("id");
            modelpms_Product_Info.ProductTypeID     = 2;
            modelpms_Product_Info.ProductIndustID   = int.Parse(ddlInd.SelectedValue);
            modelpms_Product_Info.ProductMaterID    = int.Parse(ddlMet.SelectedValue);
            modelpms_Product_Info.ProductStrucID    = int.Parse(ddlStr.SelectedValue);
            modelpms_Product_Info.CustomerRequireID = int.Parse(ddlReq.SelectedValue);
            modelpms_Product_Info.ProductInfoName   = tbxProName.Text.Trim();
            modelpms_Product_Info.ProductPhotoNum   = tbxPic.Text.Trim();
            modelpms_Product_Info.ProductStandard   = tbxSta.Text.Trim();
            modelpms_Product_Info.ProductWeight     = Convert.ToDecimal(tbxWei.Text);
            modelpms_Product_Info.OrderQuantity     = tbxOrd.Text.Trim();
            modelpms_Product_Info.Remarks           = tbxRem.Text.Trim();

            m_bllpms_Product_Info.Add(modelpms_Product_Info);
        }
Esempio n. 5
0
        private void sendMail()
        {
            int id = m_bllpms_Product_Info.GetMaxId() - 1;

            TSM.Model.pms_Product_Info modelpms_Product_Info = m_bllpms_Product_Info.GetViewModel(id);

            /********发送审批结果通知邮件*******/
            MailMessage mmsg2 = new MailMessage();

            mmsg2.From = new MailAddress("*****@*****.**", "生产管理系统", Encoding.UTF8);
            string senderDisplayName = ConfigurationManager.AppSettings["生产管理系统"];//这个配置的是发件人的要显示在邮件的名称

            mmsg2.CC.Add(new MailAddress(modelpms_Product_Info.营销员邮箱));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.CC.Add(new MailAddress("*****@*****.**"));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.Subject = modelpms_Product_Info.图号.ToString().Trim() + "-" + modelpms_Product_Info.产品名称.ToString().Trim() + "-报价通知";
            mmsg2.Body    = @"
                    <BODY style= margin:10px; width:1200px; height:900px>
                    <table style= width:1200px; height:900px>
                    <tr>
                    <td colspan=2 style= height:90px>
                    <img src=http://192.168.0.6/pms/res/images/bg_lft.gif alt=12 />
                    </td>
                    </tr>
                    <tr>
                    <td rowspan=2><img src= http://192.168.0.6/pms/res/images/bg_lft3.gif alt=22 />
                    <table style= ""width:570px; height:432px;"">
                    <tr style="" background-color:#FFB90F; font-weight:bolder; text-align:center ""><td>产品名称</td><td>图号</td><td>规范</tr></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center;""><td>" + modelpms_Product_Info.产品名称.ToString().Trim()
                            + "</td><td>" + modelpms_Product_Info.图号.ToString().Trim() + "</td><td>" + modelpms_Product_Info.规范.ToString().Trim() + @"</td></tr>
                    <tr style="" background-color:#FFB90F; text-align:center; font-weight:bolder ""><td>产品结构</td><td>材质</td><td>行业</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center ""><td>" + modelpms_Product_Info.产品结构.ToString().Trim()
                            + "</td><td>" + modelpms_Product_Info.产品材质.ToString().Trim() + "</td><td>" + modelpms_Product_Info.所在行业.ToString().Trim() + @"</td></tr>
                    <tr style="" background-color:#FFB90F; text-align:center; font-weight:bold ""><td>顾客要求</td><td>内部顾客</td><td>最终顾客</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; ""><td>" + modelpms_Product_Info.顾客要求.ToString().Trim()
                            + "</td><td>" + modelpms_Product_Info.顾客名称.ToString().Trim() + "</td><td>" + modelpms_Product_Info.最终客户.ToString().Trim() + @"</td></tr>
                    <tr style="" background-color:#FFB90F; text-align:center; font-weight:bold ""><td>净重(T)</td><td>订单量</td><td></td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; ""><td>" + modelpms_Product_Info.净重.ToString().Trim()
                            + "</td><td>" + modelpms_Product_Info.订单量.ToString().Trim() + @"</td><td></td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; ""><td>备注信息</td><td colspan= 2>" + modelpms_Product_Info.备注.ToString().Trim()
                            + @"</td></tr>
                    <tr style="" background-color:#FFFFFF; text-align:center; font-weight:bold ""><td></td><td></td><td></td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center ""><td colspan= 3 >请各位领导安排工艺员<a href=""http://192.168.0.6/pms/default.aspx""><span style="" font-weight:bolder; color:Red"">登录系统</span></a>进行报价!</td></tr>
                    </table></td>
                    <td><img src= http://192.168.0.6/pms/res/images/bg_rht2.gif  alt= 22  /></td>
                    </tr>
                    <tr>
                    <td><img src= http://192.168.0.6/pms/res/images/bg_rht1.gif  alt= 22  /></td>
                    </tr>
                    <tr>
                    <td colspan= 2 ><img src= http://192.168.0.6/pms/res/images/bg_btm.gif  alt= 22  /></td>
                    </tr>
                    </table>                  
                    </BODY> ";
            mmsg2.IsBodyHtml = true;
            SmtpClient msclient2 = new SmtpClient();

            msclient2.Host           = "192.168.0.10";
            msclient2.DeliveryMethod = SmtpDeliveryMethod.Network;
            msclient2.Credentials    = new System.Net.NetworkCredential("kp.ccz", "lan@2mail");
            try
            {
                msclient2.Send(mmsg2);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            finally
            {
            }
            /*****/
        }
Esempio n. 6
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TSM.Model.pms_Product_Info GetViewModel(int ProductInfoID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  * from view_pms_Product_Info ");
            strSql.Append(" where ProductInfoID=@ProductInfoID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ProductInfoID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ProductInfoID;

            TSM.Model.pms_Product_Info model = new TSM.Model.pms_Product_Info();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ProductInfoID"].ToString() != "")
                {
                    model.ProductInfoID = int.Parse(ds.Tables[0].Rows[0]["ProductInfoID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ProductBatchID"].ToString() != "")
                {
                    model.ProductBatchID = int.Parse(ds.Tables[0].Rows[0]["ProductBatchID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["批次名称"].ToString() != "")
                {
                    model.批次名称 = ds.Tables[0].Rows[0]["批次名称"].ToString();
                }
                model.产品名称            = ds.Tables[0].Rows[0]["产品名称"].ToString();
                model.顾客类型            = ds.Tables[0].Rows[0]["顾客类型"].ToString();
                model.顾客名称            = ds.Tables[0].Rows[0]["顾客名称"].ToString();
                model.顾客要求            = ds.Tables[0].Rows[0]["顾客要求"].ToString();
                model.产品结构            = ds.Tables[0].Rows[0]["产品结构"].ToString();
                model.产品材质            = ds.Tables[0].Rows[0]["产品材质"].ToString();
                model.所在行业            = ds.Tables[0].Rows[0]["所在行业"].ToString();
                model.图号              = ds.Tables[0].Rows[0]["图号"].ToString();
                model.规范              = ds.Tables[0].Rows[0]["规范"].ToString();
                model.净重              = ds.Tables[0].Rows[0]["净重"].ToString();
                model.日期              = ds.Tables[0].Rows[0]["日期"].ToString();
                model.订单量             = ds.Tables[0].Rows[0]["订单量"].ToString();
                model.备注              = ds.Tables[0].Rows[0]["备注"].ToString();
                model.附件名称            = ds.Tables[0].Rows[0]["附件名称"].ToString();
                model.附件地址            = ds.Tables[0].Rows[0]["附件地址"].ToString();
                model.节点              = ds.Tables[0].Rows[0]["上传节点"].ToString();
                model.时间              = ds.Tables[0].Rows[0]["上传时间"].ToString();
                model.人               = ds.Tables[0].Rows[0]["上传人"].ToString();
                model.商务联系人           = ds.Tables[0].Rows[0]["商务联系人"].ToString();
                model.商务联系电话          = ds.Tables[0].Rows[0]["商务联系电话"].ToString();
                model.商务联系邮箱          = ds.Tables[0].Rows[0]["商务联系邮箱"].ToString();
                model.质量联系人           = ds.Tables[0].Rows[0]["质量联系人"].ToString();
                model.质量联系电话          = ds.Tables[0].Rows[0]["质量联系电话"].ToString();
                model.质量联系邮箱          = ds.Tables[0].Rows[0]["质量联系邮箱"].ToString();
                model.ApprovalStatus  = ds.Tables[0].Rows[0]["ApprovalStatus"].ToString();
                model.QuotationInfoID = int.Parse(ds.Tables[0].Rows[0]["QuotationInfoID"].ToString());
                model.最终客户            = ds.Tables[0].Rows[0]["最终客户"].ToString();
                model.报价人             = ds.Tables[0].Rows[0]["报价人"].ToString();
                model.报价邮箱            = ds.Tables[0].Rows[0]["报价邮箱"].ToString();
                model.营销员邮箱           = ds.Tables[0].Rows[0]["营销员邮箱"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TSM.Model.pms_Product_Info GetModel(int ProductInfoID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ProductInfoID,ProductBatchID,CustomerRequireID,ProductTypeID,ProductStrucID,ProductMaterID,ProductIndustID,ProductInfoName,ProductPhotoNum,ProductStandard,ProductWeight,OrderQuantity,ContourSize,Remarks from pms_Product_Info ");
            strSql.Append(" where ProductInfoID=@ProductInfoID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ProductInfoID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ProductInfoID;

            TSM.Model.pms_Product_Info model = new TSM.Model.pms_Product_Info();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ProductInfoID"].ToString() != "")
                {
                    model.ProductInfoID = int.Parse(ds.Tables[0].Rows[0]["ProductInfoID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ProductBatchID"].ToString() != "")
                {
                    model.ProductBatchID = int.Parse(ds.Tables[0].Rows[0]["ProductBatchID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["CustomerRequireID"].ToString() != "")
                {
                    model.CustomerRequireID = int.Parse(ds.Tables[0].Rows[0]["CustomerRequireID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ProductTypeID"].ToString() != "")
                {
                    model.ProductTypeID = int.Parse(ds.Tables[0].Rows[0]["ProductTypeID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ProductStrucID"].ToString() != "")
                {
                    model.ProductStrucID = int.Parse(ds.Tables[0].Rows[0]["ProductStrucID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ProductMaterID"].ToString() != "")
                {
                    model.ProductMaterID = int.Parse(ds.Tables[0].Rows[0]["ProductMaterID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ProductIndustID"].ToString() != "")
                {
                    model.ProductIndustID = int.Parse(ds.Tables[0].Rows[0]["ProductIndustID"].ToString());
                }
                model.ProductInfoName = ds.Tables[0].Rows[0]["ProductInfoName"].ToString();
                model.ProductPhotoNum = ds.Tables[0].Rows[0]["ProductPhotoNum"].ToString();
                model.ProductStandard = ds.Tables[0].Rows[0]["ProductStandard"].ToString();
                if (ds.Tables[0].Rows[0]["ProductWeight"].ToString() != "")
                {
                    model.ProductWeight = decimal.Parse(ds.Tables[0].Rows[0]["ProductWeight"].ToString());
                }
                model.OrderQuantity = ds.Tables[0].Rows[0]["OrderQuantity"].ToString();
                model.ContourSize   = ds.Tables[0].Rows[0]["ContourSize"].ToString();
                model.Remarks       = ds.Tables[0].Rows[0]["Remarks"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 8
0
        private void sendMail_Final()
        {
            int ProID = GetQueryIntValue("id1");

            TSM.Model.pms_Product_Info modelpms_Product_Info = m_bllpms_Product_Info.GetViewModel(ProID);
            decimal UnitPrice = Math.Round(Convert.ToDecimal(lbPrice1.Text) / Convert.ToDecimal(modelpms_Product_Info.净重), 0);
            /********发送审批结果通知邮件***/
            MailMessage mmsg2 = new MailMessage();

            mmsg2.From = new MailAddress("*****@*****.**", "生产管理系统", Encoding.UTF8);
            mmsg2.CC.Add(new MailAddress(modelpms_Product_Info.报价邮箱));
            mmsg2.CC.Add(new MailAddress(modelpms_Product_Info.营销员邮箱));
            mmsg2.CC.Add(new MailAddress("*****@*****.**"));
            mmsg2.CC.Add(new MailAddress("*****@*****.**"));
            mmsg2.To.Add(new MailAddress(modelpms_Product_Info.商务联系邮箱));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.Subject = modelpms_Product_Info.图号 + "-" + modelpms_Product_Info.产品名称 + "-报价单";
            mmsg2.Body    = @"
                    <BODY style= margin:10px; width:1200px; height:900px>
                    <table style= width:1200px; height:900px>
                    <tr>
                    <td colspan=2 style= height:90px>
                    <img src=http://192.168.0.6/pms/res/images/bg_lft.gif alt=12 />
                    </td>
                    </tr>
                    <tr>
                    <td rowspan=2><img src= http://192.168.0.6/pms/res/images/bg_lft1.gif alt=22 />
                    <table style= ""width:570px; height:432px;"">
                    <tr style="" background-color:#FFB90F; font-weight:bolder; text-align:center ""><td>产品名称</td><td>图号</td><td>单重(T)</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>" + modelpms_Product_Info.产品名称
                            + "</td><td>" + modelpms_Product_Info.图号 + "</td><td>" + modelpms_Product_Info.净重 + @"</td></tr>
                    <tr style="" background-color:#FFFFFF; text-align:center; font-weight:bold ""><td></td><td></td><td></td></tr>
                    <tr style="" background-color:#FFB90F; font-weight:bolder; text-align:center ""><td>序号</td><td>项目</td><td>报价(元)</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>1</td><td>加工费用</td><td>" + tbxChar.Text + @"</td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; font-weight:bold ""><td>2</td><td>运输费用</td><td>" + tbxTrans.Text + @"</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>3</td><td>检测费用</td><td>" + tbxTest.Text + @"</td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; font-weight:bold ""><td>4</td><td>包装费用</td><td>" + tbxPack.Text + @"</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>合计单价</td><td></td><td>" + lbPrice1.Text + @"</td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; font-weight:bold ""><td>其它</td><td>特殊刀具</td><td>" + tbxKnife.Text + @"</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>其它</td><td>特殊工装</td><td>" + tbxTool.Text + @"</td></tr>
                    <tr style="" background-color:#FFFFFF; text-align:center; font-weight:bold ""><td></td><td></td><td></td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center ""><td>说明</td><td colspan= 2 >本次报价有效期3个月,过期则需重新评估报价</td></tr>
                    </table></td>
                    <td><img src= http://192.168.0.6/pms/res/images/bg_rht2.gif  alt= 22  /></td>
                    </tr>
                    <tr>
                    <td><img src= http://192.168.0.6/pms/res/images/bg_rht1.gif  alt= 22  /></td>
                    </tr>
                    <tr>
                    <td colspan= 2 ><img src= http://192.168.0.6/pms/res/images/bg_btm.gif  alt= 22  /></td>
                    </tr>
                    </table>                  
                    </BODY> ";
            mmsg2.IsBodyHtml = true;
            SmtpClient msclient2 = new SmtpClient();

            msclient2.Host           = "192.168.0.10";
            msclient2.DeliveryMethod = SmtpDeliveryMethod.Network;
            msclient2.Credentials    = new System.Net.NetworkCredential("kp.ccz", "lan@2mail");
            try
            {
                msclient2.Send(mmsg2);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            finally
            {
            }
            /****/
        }
        private void sendMail()
        {
            var uname = HttpUtility.UrlEncode("刘立");
            var url1  = "http://192.168.0.6/pms/pms_Processing_Approval_Info.aspx?uname=" + uname + "&uid=4";
            //var url1 = "http://*****:*****@kocel.com", "生产管理系统", Encoding.UTF8);
            mmsg2.CC.Add(new MailAddress(modelpms_Product_Info.报价邮箱));
            mmsg2.CC.Add(new MailAddress(modelpms_Product_Info.营销员邮箱));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.To.Add(new MailAddress("*****@*****.**"));
            mmsg2.Subject = modelpms_Product_Info.图号 + "-" + modelpms_Product_Info.产品名称 + "-审批通知";
            mmsg2.Body    = @"
                    <BODY style= margin:10px; width:1200px; height:900px>
                    <table style= width:1200px; height:900px>
                    <tr>
                    <td colspan=2 style= height:90px>
                    <img src=http://192.168.0.6/pms/res/images/bg_lft.gif alt=12 />
                    </td>
                    </tr>
                    <tr>
                    <td rowspan=2><img src= http://192.168.0.6/pms/res/images/bg_lft3.gif alt=22 />
                    <table style= ""width:570px; height:432px;"">
                    <tr style="" background-color:#FFB90F; font-weight:bolder; text-align:center ""><td>产品名称</td><td>图号</td><td>单重(T)</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>" + modelpms_Product_Info.产品名称
                            + "</td><td>" + modelpms_Product_Info.图号 + "</td><td>" + modelpms_Product_Info.净重 + @"</td></tr>
                    <tr style="" background-color:#FFFFFF; text-align:center; font-weight:bold ""><td></td><td></td><td></td></tr>
                    <tr style="" background-color:#FFB90F; font-weight:bolder; text-align:center ""><td>序号</td><td>项目</td><td>报价(元)</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>1</td><td>加工费用</td><td>" + tbxCharge.Text + @"</td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; font-weight:bold ""><td>2</td><td>运输费用</td><td>" + tbxTrans.Text + @"</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>3</td><td>检测费用</td><td>" + tbxTest.Text + @"</td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; font-weight:bold ""><td>4</td><td>包装费用</td><td>" + tbxPack.Text + @"</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>5</td><td>喷涂费用</td><td>" + tbxSpray.Text + @"</td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; font-weight:bold ""><td>合计单价</td><td></td><td>" + Price + @"</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>吨单价</td><td></td><td>" + lbUnitPrice.Text + @"</td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center; font-weight:bold ""><td>其它</td><td>特殊刀具</td><td>" + tbxKnife.Text + @"</td></tr>
                    <tr style="" background-color:#D1EEEE; text-align:center; font-weight:bold ""><td>其它</td><td>特殊工装</td><td>" + tbxTool.Text + @"</td></tr>
                    <tr style="" background-color:#FFFFFF; text-align:center; font-weight:bold ""><td></td><td></td><td></td></tr>
                    <tr style="" background-color:#EEEED1; text-align:center ""><td colspan= 3 >刘部长您好,请您<a href=" + url1 + @"><span style="" font-weight:bolder; color:Red"">登录系统</span></a>进行报价审批!</td></tr>
                    </table></td>
                    <td><img src= http://192.168.0.6/pms/res/images/bg_rht2.gif  alt= 22  /></td>
                    </tr>
                    <tr>
                    <td><img src= http://192.168.0.6/pms/res/images/bg_rht1.gif  alt= 22  /></td>
                    </tr>
                    <tr>
                    <td colspan= 2 ><img src= http://192.168.0.6/pms/res/images/bg_btm.gif  alt= 22  /></td>
                    </tr>
                    </table>                  
                    </BODY> ";
            mmsg2.IsBodyHtml = true;
            SmtpClient msclient2 = new SmtpClient();

            msclient2.Host           = "192.168.0.10";
            msclient2.DeliveryMethod = SmtpDeliveryMethod.Network;
            msclient2.Credentials    = new System.Net.NetworkCredential("kp.ccz", "lan@2mail");
            try
            {
                msclient2.Send(mmsg2);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            finally
            {
            }
            /*****/
        }