|
int ID = Convert.ToInt32 (this.dList.DataKeys [e.Item.ItemIndex] .ToString ()); // take the current corresponding ID number
int House = Convert.ToInt32 (((TextBox) e.Item.FindControl ("txtHouse")). Text.ToString ());
string SerialNumber = ((TextBox) e.Item.FindControl ("txtSerialNumber")). Text.ToString ();
string Name = ((TextBox) e.Item.FindControl ("txtName")). Text.ToString ();
string Phone = ((TextBox) e.Item.FindControl ("txtPhone")). Text.ToString ();
string Email = ((TextBox) e.Item.FindControl ("txtEmail")). Text.ToString ();
string CheckInDate = Convert.ToDateTime (((TextBox) e.Item.FindControl ("CheckInDate")). Text.ToString ()). ToString ();
string CheckOutDate = Convert.ToDateTime (((TextBox) e.Item.FindControl ("CheckOutDate")). Text.ToString ()). ToString ();
int Confirm = Convert.ToInt32 (((DropDownList) e.Item.FindControl ("ddlConfirm")). SelectedValue.ToString ());
string Remark = ((TextBox) e.Item.FindControl ("txtRemark")). Text.ToString ();
string Datetime = Convert.ToDateTime (((TextBox) e.Item.FindControl ("txtDatetime")). Text.ToString ()). ToString ();
Schedule updateOne = new Schedule ();
updateOne.Update (ID, House, SerialNumber, Name, Phone, Email, CheckInDate, CheckOutDate, Confirm, Remark, Datetime);
this.dList.EditItemIndex = -1;
this.mfbind ();
} |
|