日期:2014-05-17 浏览次数:20393 次
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
int normalTemperature = Convert.ToInt16(DropDownList1.SelectedItem.Text);
int addTemperature = Convert.ToInt16(DropDownList2.SelectedItem.Text);
double materialValue = Convert.ToDouble(DropDownList3.SelectedItem.Value);
int equipmentQuantity = Convert.ToInt16(TextBox2.Text);
int normalMoisture = Convert.ToInt16(DropDownList5.SelectedItem.Text);
int addMoisture = Convert.ToInt16(DropDownList6.SelectedItem.Text);
int targetMTBF = Convert.ToInt16(TextBox3.Text);
double power1 = materialValue / normalTemperature - materialValue / addTemperature;
double power2 = (normalMoisture * normalMoisture)/10000 - (addMoisture * addMoisture)/10000;
double moutiplier = Math.Pow(2.18, power1);
double montiplicand = Math.Pow(2.18,power2);
double af = moutiplier * montiplicand;
double t=targetMTBF/(equipmentQuantity*af);
TextBox1.Text = t.ToString();
}
protected void btc()
{
int normalTemperature = Convert.ToInt16(DropDownList1.SelectedItem.Text);
int addTemperature = Convert.ToInt16(DropDownList2.SelectedItem.Text); double materialValue = Convert.ToDouble(DropDownList3.SelectedItem.Value);
int equipmentQuantity = Convert.ToInt16(TextBox2.Text);&