MonthDropDownList
SQL データ ソースで区切られた月で構成されるという名前のドロップ ダウンリストがあります。今、私はlikeの値にアクセスしMonthDropDownList
たい
MonthDropDownList.selecteditem++.
そう
if MonthDropDownList.selecteditem=January
then MonthDropDownList.selecteditem++=Febraury
どうすればこれを達成できますか???
これは私のコードです
DataClassesDataContext db = null;
db = new DataClassesDataContext();
tblAdvance advance = new tblAdvance();
advance.StudentID = Convert.ToInt32(StudentNameDropDownList.SelectedValue);
advance.FromMonth = FromMonthDropDownList.SelectedItem.Value;
advance.UptoMonth = ToMonthDropDownList.SelectedItem.Value;
advance.AdvanceAmount = Convert.ToInt32(txtAdvanceAmount.Text);
advance.RollNo = Convert.ToInt32(txtRollNo.Text);
db.tblAdvances.InsertOnSubmit(advance);
db.SubmitChanges();
db.Connection.Close();
db.Dispose();
for (int i = FromMonthDropDownList.SelectedIndex; i <= ToMonthDropDownList.SelectedIndex;i++ )
{
DataClassesDataContext dc = null;
dc = new DataClassesDataContext();
tblTotalFee bill = new tblTotalFee();
bill.StudentID = Convert.ToInt32(StudentNameDropDownList.SelectedValue);
bill.MonthName=FromMonthDropDownList.SelectedIndex[i]
bill.DueFromPreviousMonth = 0;
bill.ECAFee = 0;
bill.HostelFee = 0;
bill.LateFeeCharges = 0;
bill.MonthlyFee = 0;
bill.TransportFee = 0;
bill.TotalFeeThisMonthAlongwithDueinthismonth=0;
dc.tblTotalFees.InsertOnSubmit(bill);
dc.SubmitChanges();
I want something like the blockquoted line
dc.Connection.Close();
dc.Dispose();
}