PDA

View Full Version : سوال: ایجاد جدول از طریق کد



eli_joon
سه شنبه 26 شهریور 1387, 10:34 صبح
با سلام خدمت دوستان عزیز
تکه کدی نیاز دارم که به وسیله آن یک جدول با فیلدهای خاصی ایجاد کنم .
همین حالا نیاز دارم
ممنون

Dariuosh
سه شنبه 26 شهریور 1387, 10:53 صبح
فوري ؟؟!!
_________

ايجاد جدول تو MS SQL يا تو خود برنامه يا ....؟

eli_joon
سه شنبه 26 شهریور 1387, 10:57 صبح
ایجاد جدول در خود برنامه

Arian_61
دوشنبه 29 مهر 1387, 16:31 عصر
age dorost fahmide basham injori mishetoy khod barname khob satr o sotonasho dynamic dorost kon bad nesbatesh bede be khasyat text ye literal masalan.
inam ye mesal omidvaram komaket kone



StringBuilder TabelViewIdeaChoice = new StringBuilder();
TabelViewIdeaChoice.Append(" <table border='1' cellpadding='0' cellspacing='0' style='border-right: #000000 thin inset;border-top: #000000 thin inset; font-weight: bold; font-size: 9pt; border-left: #000000 thin inset;width: 75%; color: #000000; border-bottom: #000000 thin inset; font-family: tahoma' id='table1'><tr><td align='center' bgcolor='aliceblue' dir='rtl' style='height: 20px'>نمودار</td><td align='center' bgcolor='aliceblue' dir='rtl' style='width: 64px; height: 20px'>درصد</td><td align='center' bgcolor='aliceblue' dir='rtl' style='width: 117px; height: 20px'>تعداد نظر</td><td align='center' bgcolor='aliceblue' dir='rtl' style='width: 87px; height: 20px'>نظر</td></tr>");
float DarSad;
int countIdeaChoice = 0;
while (drViewIdeaChoice.Read())
{
try
{
countIdeaChoice = CalculateCountIdeaChoice(drViewIdeaChoice.GetInt32 (1));
DarSad = ((countIdeaChoice * 100) / count);
}
catch (Exception)
{
DarSad = 0;
}
if (DarSad == 0)
{
TabelViewIdeaChoice.Append("<tr><td align='left' dir='rtl' style='height: 20px'><table id='table2' border='0' cellpadding='0' cellspacing='0' width='1%'><tr><td width='11'><img src='../chartpic/btn_right_darkblue.jpg' /></td><td height='20px' style='background-image: url(../chartpic/btn_back_darkblue.jpg)' width='100%'></td></tr></table></td><td align='center' dir='ltr' style='width: 64px; height: 20px'>" + DarSad.ToString() + "%</td><td align='center' dir='rtl' style='width: 117px; height: 20px'>" + drViewIdeaChoice.GetInt32(1).ToString() + "</td><td align='center' dir='rtl' style='width: 87px; height: 20px'>" + drViewIdeaChoice.GetString(0) + "</td></tr>");
}
else
{
TabelViewIdeaChoice.Append("<tr><td align='left' dir='rtl' style='height: 20px'><table id='table2' border='0' cellpadding='0' cellspacing='0' width='" + DarSad.ToString() + "%'><tr><td width='11'><img src='../chartpic/btn_right_darkblue.jpg' /></td><td height='20px' style='background-image: url(../chartpic/btn_back_darkblue.jpg)' width='100%'></td></tr></table></td><td align='center' dir='ltr' style='width: 64px; height: 20px'>" + DarSad.ToString() + "%</td><td align='center' dir='rtl' style='width: 117px; height: 20px'>" + drViewIdeaChoice.GetInt32(1).ToString() + "</td><td align='center' dir='rtl' style='width: 87px; height: 20px'>" + drViewIdeaChoice.GetString(0) + "</td></tr>");
}
}
TabelViewIdeaChoice.Append(" </table>");
lViewIdeaChoice.Text = TabelViewIdeaChoice.ToString();

saeidcd
سه شنبه 17 فروردین 1389, 12:12 عصر
با سلام خدمت دوستان عزیز
تکه کدی نیاز دارم که به وسیله آن یک جدول با فیلدهای خاصی ایجاد کنم .
همین حالا نیاز دارم
ممنون

امیدوارم بدردت بخوره