SqlParameter[] @params;
if (app.AppId == 1)
{
@params = {
SqlParameter("@AppId", app.AppId), new SqlParameter("@FirstName", app.FirstName??""), new SqlParameter("@MiddleName", app.MiddleName ?? ""), new SqlParameter("@Gender", app.Gender??"")};
@params[0].Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(cn, CommandType.StoredProcedure, "Create_Kiosk", @params);
}
else
{
@params = {
SqlParameter("@AppId", app.AppId), new SqlParameter("@FirstName", app.FirstName??""), new SqlParameter("@MiddleName", app.MiddleName ?? ""), new SqlParameter("@Gender", app.Gender??"")};
@params[0].Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(cn, CommandType.StoredProcedure, "Create", @params);
}