在给定场景下创建逻辑问题 [英] Problem Creating logic for a given Scenario

查看:69
本文介绍了在给定场景下创建逻辑问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!!!!

我有12个文本框,可用于输入不同月份的总费用.
现在我需要做的是,如果用户在1月和8月输入rateOfIntrest,那么
属性obj. 2月到obj.July应该获取Obj.January的数据,然后是obj.August.如果只输入1月的数据,则所有属性都将获取1月的数据.现在,用户可以输入RateOfIntrest任意数量的时间.请指导我如何完成...

Hello all!!!

I have 12 text-boxes for entering Rate-Of-Intrest for different months.
Now what i need to do is if users enter rateOfIntrest in january and in august then
the properties obj. February to obj.July should get data that of Obj.January and after that that of obj.August.If data for only January is entered then all the properties will be get data that of January. Now user can enter RateOfIntrest for as many months that it wants. Please guide me how will it be done...

推荐答案

,在这种情况下,当用户可以提供第一个文本框值时,贝娄方法可以为您提供帮助.

in this case when first text box value can given by the user then bellow method can help u.

TextBox1.Text ="10";
if (TextBox2.Text == "")
{
    TextBox2.Text = TextBox1.Text;
}
if (TextBox3.Text == "")
{
    TextBox3.Text = TextBox2.Text;
}
if (TextBox4.Text == "")
{
    TextBox4.Text = TextBox3.Text;
}
if (TextBox5.Text == "")
{
    TextBox5.Text = TextBox4.Text;
}
if (TextBox6.Text == "")
{
    TextBox6.Text = TextBox5.Text;
}
if (TextBox7.Text == "")
{
    TextBox7.Text = TextBox6.Text;
}
if (TextBox8.Text == "")
{
    TextBox8.Text = TextBox7.Text;
}
if (TextBox9.Text == "")
{
    TextBox9.Text = TextBox8.Text;
}
if (TextBox10.Text == "")
{
    TextBox10.Text = TextBox9.Text;
}
if (TextBox11.Text == "")
{
    TextBox11.Text = TextBox10.Text;
}
if (TextBox12.Text == "")
{
    TextBox12.Text = TextBox11.Text;
}



如果TextBox3文本可以更改,则现在考虑TextBox3值.



if TextBox3 text can change then it now consider TextBox3 values..


这篇关于在给定场景下创建逻辑问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆