protected void ddlSubOrderStatus_SelectedIndexChanged(object sender, System.EventArgs e) { if (hdnSubOrderId.Value != "") { DropDownList ddl = (DropDownList)sender; objSuborder = new tblSubOrder(); if (objSuborder.LoadByPrimaryKey(Convert.ToInt32(hdnSubOrderId.Value))) { if (ddl.SelectedValue != objSuborder.s_AppSubOrderStatusID) { objSuborder.s_AppSubOrderStatusID = ddl.SelectedValue; objSuborder.s_AppSubOrderChangeDate = FormatDateString(DateTime.Now.ToString(strInputDateFormat), strInputDateFormat, strOutputDateFormat); objSuborder.Save(); } } objSuborder = null; hdnSubOrderId.Value = ""; LoadDataGrid(false, false); } }