我的项目是供应链管理,我想在asp.net发送邮件时发明低,然后我想发送邮件...总库存是50 ...这是我现在在提交按钮中完成的代码这个提交按钮我还会在库存不足时发送邮件..我这样做了
b = inv.get_Inv(Convert.ToInt32(ddl_product.SelectedValue));
d = inv.get_reorder(Convert.ToInt16(ddl_product.SelectedValue));
if (b > 0 && b >= Convert.ToInt32(Txtquantity.Text))
{
c = b - Convert.ToInt32(Txtquantity.Text);
saleorderid =
(DLL.ClassSales.addsales(Convert.ToInt32(ddl_customer.SelectedValue),
Convert.ToDateTime(Calendar1.SelectedDate),
Convert.ToInt16(ddl_status.SelectedValue))).ToString();
DLL.ClassSales.addsaleOrderDetail(Convert.ToInt16(saleorderid),
Convert.ToInt32(ddl_product.SelectedValue),
Convert.ToDecimal(Txtupprice.Text), Convert.ToInt32(Txtquantity.Text));
DLL.ClassInventory.Update_inventory(Convert.ToInt32(ddl_product.SelectedValue), c);
}
if (c <= d)
{ // alert and email (main menu pe jana chahiye)
Response.Redirect("Purchases.aspx");
}
else
{
//Label1.Text = "Inventory invalid";
}