protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Display dropdownlist with Customer ID (=OwnerID) OwnerID Ids = new OwnerID(ids); try { ConnectionClass.OnwerIDList(Ids); OwnerID.DataSource = Ids.OwnerIDs; OwnerID.DataTextField = Ids.OwnerIDs.Columns["NAME"].ToString(); OwnerID.DataValueField = Ids.OwnerIDs.Columns["ID"].ToString(); OwnerID.DataBind(); } finally { } // Display Calendar with month, year and date for (int i = 1; i <= 12; i++) { System.Globalization.DateTimeFormatInfo monthnum = new System.Globalization.DateTimeFormatInfo(); month.Items.Add(new ListItem(monthnum.GetAbbreviatedMonthName(i).ToString(), i.ToString())); } for (int i = 1980; i <= System.DateTime.Now.Year; i++) { year.Items.Add(new ListItem(i.ToString(), i.ToString())); } } }
} // 쓸수 있을까?? protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { VetID Vids = new VetID(vids); OwnerID Oids = new OwnerID(oids); try { // Display dropdownlist with Vet ID ConnectionClass.VetIDList(Vids); vetIDList.DataSource = Vids.VetIDs; vetIDList.DataTextField = Vids.VetIDs.Columns["NAME"].ToString(); vetIDList.DataValueField = Vids.VetIDs.Columns["ID"].ToString(); vetIDList.DataBind(); // Display dropdownlist with Customer(Pet Owner) ID ConnectionClass.OnwerIDList(Oids); cusIDList.DataSource = Oids.OwnerIDs; cusIDList.DataTextField = Oids.OwnerIDs.Columns["NAME"].ToString(); cusIDList.DataValueField = Oids.OwnerIDs.Columns["ID"].ToString(); cusIDList.DataBind(); } finally { } // Display Calendar with month, year and date for (int i = 1; i <= 12; i++) { System.Globalization.DateTimeFormatInfo monthnum = new System.Globalization.DateTimeFormatInfo(); month.Items.Add(new ListItem(monthnum.GetAbbreviatedMonthName(i).ToString(), i.ToString())); } for (int i = 2015; i <= System.DateTime.Now.Year + 1; i++) { year.Items.Add(new ListItem(i.ToString(), i.ToString())); } } }